Author: cazfi
Date: Fri Aug 12 10:30:01 2016
New Revision: 33572

URL: http://svn.gna.org/viewcvs/freeciv?rev=33572&view=rev
Log:
Fixed crash when unit without former homecity tries to change homecity.

Reported by Andreas Røsdal <andreasr>

See bug #24957

Modified:
    trunk/common/actions.c

Modified: trunk/common/actions.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.c?rev=33572&r1=33571&r2=33572&view=diff
==============================================================================
--- trunk/common/actions.c      (original)
+++ trunk/common/actions.c      Fri Aug 12 10:30:01 2016
@@ -1569,7 +1569,7 @@
   case ACTION_HOME_CITY:
     /* Reason: can't change to what is. */
     /* Info leak: The player knows his unit's current home city. */
-    if (homecity->id == target_city->id) {
+    if (homecity != NULL && homecity->id == target_city->id) {
       /* This is already the unit's home city. */
       return TRI_NO;
     }


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

Reply via email to