Author: cazfi
Date: Sat Aug 29 23:19:18 2015
New Revision: 29725

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

See bug #23825

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

Modified: branches/S2_5/ai/default/aidata.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/ai/default/aidata.c?rev=29725&r1=29724&r2=29725&view=diff
==============================================================================
--- branches/S2_5/ai/default/aidata.c   (original)
+++ branches/S2_5/ai/default/aidata.c   Sat Aug 29 23:19:18 2015
@@ -94,6 +94,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