Author: cazfi
Date: Sat Aug 29 23:19:10 2015
New Revision: 29724

URL: http://svn.gna.org/viewcvs/freeciv?rev=29724&view=rev
Log:
Finish AI data phase when AI data module is closed, if it's currently active.

See bug #23825

Modified:
    branches/S2_6/ai/default/aidata.c

Modified: branches/S2_6/ai/default/aidata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/ai/default/aidata.c?rev=29724&r1=29723&r2=29724&view=diff
==============================================================================
--- branches/S2_6/ai/default/aidata.c   (original)
+++ branches/S2_6/ai/default/aidata.c   Sat Aug 29 23:19:10 2015
@@ -100,6 +100,10 @@
 void dai_data_close(struct ai_type *ait, struct player *pplayer)
 {
   struct ai_plr *ai = def_ai_player_data(pplayer, ait);
+
+  /* Finish the phase if it's open - free resources related to
+   * open/finish cycle */
+  dai_data_phase_finished(ait, pplayer);
 
   /* Free autosettler. */
   dai_auto_settler_free(ai);


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

Reply via email to