Author: mir3x Date: Wed Oct 28 10:34:19 2015 New Revision: 30271 URL: http://svn.gna.org/viewcvs/freeciv?rev=30271&view=rev Log: Client could crash in pregame page, when there is ongoing game and turn was changed (client was told to update information label which wasn't created yet). Fix attatched.
See bug #23963 Modified: branches/S2_5/client/gui-qt/mapview.cpp Modified: branches/S2_5/client/gui-qt/mapview.cpp URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/client/gui-qt/mapview.cpp?rev=30271&r1=30270&r2=30271&view=diff ============================================================================== --- branches/S2_5/client/gui-qt/mapview.cpp (original) +++ branches/S2_5/client/gui-qt/mapview.cpp Wed Oct 28 10:34:19 2015 @@ -1146,8 +1146,12 @@ ****************************************************************************/ void update_info_label(void) { - QString eco_info; - QString s = QString(_("%1 (Turn:%2)")).arg(textyear(game.info.year), + QString s, eco_info; + + if (gui()->current_page() != PAGE_GAME) { + return; + } + s = QString(_("%1 (Turn:%2)")).arg(textyear(game.info.year), QString::number(game.info.turn)); gui()->game_info_label->set_turn_info(s); set_indicator_icons(client_research_sprite(), _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits