<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40185 >
$subject There was attempt to log city name even when there was no city. Found from all branches starting from S2_1. - ML
diff -Nurd -X.diff_ignore freeciv/ai/advdiplomacy.c freeciv/ai/advdiplomacy.c --- freeciv/ai/advdiplomacy.c 2008-01-15 04:04:30.000000000 +0200 +++ freeciv/ai/advdiplomacy.c 2008-04-04 23:16:21.000000000 +0300 @@ -423,6 +423,7 @@ notify(aplayer, _("*%s (AI)* I do not know the city you mention."), player_name(pplayer)); worth = 0; + DIPLO_LOG(LOG_DEBUG, pplayer, aplayer, "city destroyed during negotiations"); } else if (give) { /* AI must be crazy to trade away its cities */ worth -= city_gold_worth(offer); @@ -438,8 +439,10 @@ } else { worth = city_gold_worth(offer); } - DIPLO_LOG(LOG_DEBUG, pplayer, aplayer, "worth of %s is %d", - city_name(offer), worth); + if (offer != NULL) { + DIPLO_LOG(LOG_DEBUG, pplayer, aplayer, "worth of %s is %d", + city_name(offer), worth); + } break; }
_______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev