Author: sveinung Date: Sun Jul 24 05:43:02 2016 New Revision: 33310 URL: http://svn.gna.org/viewcvs/freeciv?rev=33310&view=rev Log: Don't crash on savegame error reporting.
Say "missing" rather than trying to print the name of the missing extra the activity target. See bug #24868 Modified: branches/S2_6/server/savegame2.c Modified: branches/S2_6/server/savegame2.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/savegame2.c?rev=33310&r1=33309&r2=33310&view=diff ============================================================================== --- branches/S2_6/server/savegame2.c (original) +++ branches/S2_6/server/savegame2.c Sun Jul 24 05:43:02 2016 @@ -3988,8 +3988,11 @@ unit_list_iterate(pplayer->units, punit) { if (!can_unit_continue_current_activity(punit)) { log_sg("Unit doing illegal activity in savegame!"); - log_sg("Activity: %s, Target: %s", unit_activity_name(punit->activity), - extra_rule_name(punit->activity_target)); + log_sg("Activity: %s, Target: %s", + unit_activity_name(punit->activity), + punit->activity_target ? extra_rule_name( + punit->activity_target) + : "missing"); punit->activity = ACTIVITY_IDLE; } } unit_list_iterate_end; _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits