eliot-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Eliot-dev] eliot/qt player_widget.cpp


From: Olivier Teulière
Subject: [Eliot-dev] eliot/qt player_widget.cpp
Date: Sun, 30 Nov 2008 20:54:57 +0000

CVSROOT:        /cvsroot/eliot
Module name:    eliot
Changes by:     Olivier Teulière <ipkiss>      08/11/30 20:54:57

Modified files:
        qt             : player_widget.cpp 

Log message:
        Fixed a crash when creating 2 games in the same session

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/qt/player_widget.cpp?cvsroot=eliot&r1=1.11&r2=1.12

Patches:
Index: player_widget.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/qt/player_widget.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- player_widget.cpp   30 Nov 2008 20:53:45 -0000      1.11
+++ player_widget.cpp   30 Nov 2008 20:54:57 -0000      1.12
@@ -444,6 +444,11 @@
 
 void PlayerTabWidget::changeCurrentPlayer(int p)
 {
+    // This method is triggered somehow when creating a Duplicate game
+    // after a FreeGame one. The next line avoids crashing in this case...
+    if (m_game == NULL)
+        return;
+
     // Change the active player when the active tab changes
     // (only in duplicate mode)
     if (m_game->getMode() == PublicGame::kDUPLICATE &&




reply via email to

[Prev in Thread] Current Thread [Next in Thread]