Author: cazfi
Date: Mon May 1 19:46:17 2017
New Revision: 35361
URL: http://svn.gna.org/viewcvs/freeciv?rev=35361&view=rev
Log:
Fix AI crash when there's no suitable ferryboat type
Reported by Eric <koqebwix>
See gna bug #25628
Modified:
branches/S2_5/ai/default/advmilitary.c
Modified: branches/S2_5/ai/default/advmilitary.c
URL:
http://svn.gna.org/viewcvs/freeciv/branches/S2_5/ai/default/advmilitary.c?rev=35361&r1=35360&r2=35361&view=diff
==============================================================================
--- branches/S2_5/ai/default/advmilitary.c (original)
+++ branches/S2_5/ai/default/advmilitary.c Mon May 1 19:46:17 2017
@@ -1278,9 +1278,9 @@
/* We might need a new boat even if there are boats free,
* if they are blockaded or in inland seas*/
fc_assert_ret(is_ground_unit(myunit));
- dai_choose_role_unit(pplayer, pcity, choice, CT_ATTACKER,
- L_FERRYBOAT, choice->want, TRUE);
- if (UMT_SEA == utype_move_type(choice->value.utype)) {
+ if (dai_choose_role_unit(pplayer, pcity, choice, CT_ATTACKER,
+ L_FERRYBOAT, choice->want, TRUE)
+ && UMT_SEA == utype_move_type(choice->value.utype)) {
#ifdef DEBUG
struct ai_plr *ai = dai_plr_data_get(ait, pplayer, NULL);
_______________________________________________
Freeciv-commits mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-commits