Author: cazfi
Date: Sat Jul 19 16:22:31 2014
New Revision: 25646

URL: http://svn.gna.org/viewcvs/freeciv?rev=25646&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:
    branches/S2_5/ai/threaded/taicity.c

Modified: branches/S2_5/ai/threaded/taicity.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/ai/threaded/taicity.c?rev=25646&r1=25645&r2=25646&view=diff
==============================================================================
--- branches/S2_5/ai/threaded/taicity.c (original)
+++ branches/S2_5/ai/threaded/taicity.c Sat Jul 19 16:22:31 2014
@@ -202,8 +202,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