[Freeciv-Dev] Re: (PR#12402) PF crash in ai_manage_buildings
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12402 >
On Wed, 2 Mar 2005, Jason Short wrote:
> I got this just today while running a test game.
Duh. Sorry. Patch attached.
- Per
Index: ai/aicity.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aicity.c,v
retrieving revision 1.197
diff -u -r1.197 aicity.c
--- ai/aicity.c 2 Mar 2005 10:45:26 -0000 1.197
+++ ai/aicity.c 3 Mar 2005 23:07:18 -0000
@@ -673,6 +673,10 @@
acity->ai.distance_to_wonder_city = 0; /* unavailable */
} city_list_iterate_end;
+ if (ai->wonder_city == NULL) {
+ return;
+ }
+
unittype = best_role_unit_for_player(pplayer, F_HELP_WONDER);
if (unittype == U_LAST) {
return;
|
|