Author: cazfi
Date: Sat Jul 19 16:22:25 2014
New Revision: 25645

URL: http://svn.gna.org/viewcvs/freeciv?rev=25645&view=rev
Log:
When main thread receives worker task for a city from player thread, make
sure that the player in question still owns the city before adding task there.

See bug #22344

Modified:
    trunk/ai/threaded/taicity.c

Modified: trunk/ai/threaded/taicity.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/ai/threaded/taicity.c?rev=25645&r1=25644&r2=25645&view=diff
==============================================================================
--- trunk/ai/threaded/taicity.c (original)
+++ trunk/ai/threaded/taicity.c Sat Jul 19 16:22:25 2014
@@ -266,8 +266,8 @@
 
   pcity = game_city_by_number(data->city_id);
 
-  if (pcity != NULL) {
-    /* City has not disappeared meanwhile */
+  if (pcity != NULL && city_owner(pcity) == req->plr) {
+    /* City has not been lost meanwhile */
 
     log_debug("%s storing req for act %d at (%d,%d)",
               pcity->name, data->task.act, TILE_XY(data->task.ptile));


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

Reply via email to