Author: mir3x
Date: Wed Oct 28 10:34:39 2015
New Revision: 30272

URL: http://svn.gna.org/viewcvs/freeciv?rev=30272&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:
    trunk/client/gui-qt/mapview.cpp

Modified: trunk/client/gui-qt/mapview.cpp
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/client/gui-qt/mapview.cpp?rev=30272&r1=30271&r2=30272&view=diff
==============================================================================
--- trunk/client/gui-qt/mapview.cpp     (original)
+++ trunk/client/gui-qt/mapview.cpp     Wed Oct 28 10:34:39 2015
@@ -1151,8 +1151,12 @@
 ****************************************************************************/
 void update_info_label(void)
 {
-  QString eco_info;
-  QString s = QString(_("%1 (Turn:%2)")).arg(calendar_text(),
+  QString s, eco_info;
+
+  if (gui()->current_page() != PAGE_GAME) {
+    return;
+  }
+  s = QString(_("%1 (Turn:%2)")).arg(calendar_text(),
                                              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

Reply via email to