Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] Re: (PR#12402) PF crash in ai_manage_buildings
Home

[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]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#12402) PF crash in ai_manage_buildings
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Thu, 3 Mar 2005 15:09:22 -0800
Reply-to: bugs@xxxxxxxxxxx

<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;

[Prev in Thread] Current Thread [Next in Thread]