# HG changeset patch
# User sheepluva
# Date 1316976891 -7200
# Node ID 2833862a7e005820b2946966be702bd8d033d101
# Parent  d38da7c19e43ab1006b80ed6ea6121394ab994a0
get rid of that annoying 'Invalid state: in Lobby' message after room being closed or player being kicked from room. (the frontend always tried to leave the room he already left again)

diff -r d38da7c19e43 -r 2833862a7e00 QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp	Sun Sep 25 19:30:10 2011 +0200
+++ b/QTfrontend/hwform.cpp	Sun Sep 25 20:54:51 2011 +0200
@@ -549,7 +549,7 @@
             GoBack();
 
     if (curid == ID_PAGE_ROOMSLIST || curid == ID_PAGE_CONNECTING) NetDisconnect();
-    if (curid == ID_PAGE_NETGAME && hwnet) hwnet->partRoom();
+    if (curid == ID_PAGE_NETGAME && hwnet && hwnet.isInRoom()) 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();