Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2006:
[Freeciv-Dev] (PR#16492) Fix fortress crash
Home

[Freeciv-Dev] (PR#16492) Fix fortress crash

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#16492) Fix fortress crash
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Mon, 17 Apr 2006 06:38:51 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=16492 >

Place unowned fortress with editor. Move unit over fortress. Crash.
One-line patch attached.

 - Per

Index: server/unittools.c
===================================================================
--- server/unittools.c  (revision 11847)
+++ server/unittools.c  (working copy)
@@ -2695,7 +2695,7 @@
 
   /* Claim ownership of fortress? */
   if (tile_has_special(pdesttile, S_FORTRESS)
-      && pplayers_at_war(pdesttile->owner, pplayer)) {
+      && (!pdesttile->owner || pplayers_at_war(pdesttile->owner, pplayer))) {
     map_claim_ownership(pdesttile, pplayer, pdesttile);
   }
 

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#16492) Fix fortress crash, Per I. Mathisen <=