Author: sveinung
Date: Fri Nov 27 10:41:26 2015
New Revision: 30804

URL: http://svn.gna.org/viewcvs/freeciv?rev=30804&view=rev
Log:
Don't access unit tile of dead unit

See bug #24121

Modified:
    trunk/server/cityturn.c

Modified: trunk/server/cityturn.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/cityturn.c?rev=30804&r1=30803&r2=30804&view=diff
==============================================================================
--- trunk/server/cityturn.c     (original)
+++ trunk/server/cityturn.c     Fri Nov 27 10:41:26 2015
@@ -2543,10 +2543,11 @@
   {
     const char *punit_link = unit_tile_link(punit);
     const char *punit_logname = unit_name_translation(punit);
+    struct tile *utile = unit_tile(punit);
 
     if (upkeep_kill_unit(punit, O_GOLD, ULR_SOLD,
                          game.info.muuk_gold_wipe)) {
-      notify_player(pplayer, unit_tile(punit), E_UNIT_LOST_MISC, ftc_server,
+      notify_player(pplayer, utile, E_UNIT_LOST_MISC, ftc_server,
                     _("Not enough gold. %s disbanded."),
                     punit_link);
       log_debug("%s: unit sold (%s)", player_name(pplayer),


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to