Prevent frontend crash in certain circumstances
authorunc0rr
Mon, 10 Jan 2011 18:20:58 +0300
changeset 4831 57b46b5dbfff
parent 4830 c5ddc3e6c8a4
child 4832 e55e2b6f59b0
Prevent frontend crash in certain circumstances
QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp	Mon Jan 10 15:53:49 2011 +0300
+++ b/QTfrontend/hwform.cpp	Mon Jan 10 18:20:58 2011 +0300
@@ -545,7 +545,7 @@
             GoBack();
 
     if (curid == ID_PAGE_ROOMSLIST) NetDisconnect();
-    if (curid == ID_PAGE_NETGAME) hwnet->partRoom();
+    if (curid == ID_PAGE_NETGAME && hwnet) hwnet->partRoom();
     // need to work on this, can cause invalid state for admin quit trying to prevent bad state message on kick
     //if (curid == ID_PAGE_NETGAME && (!game || game->gameState != gsStarted)) hwnet->partRoom();