QTfrontend/hwform.cpp
changeset 1672 6a451649558c
parent 1671 bb12cb688f75
child 1782 e7589e37a6d6
--- a/QTfrontend/hwform.cpp	Wed Jan 14 16:49:44 2009 +0000
+++ b/QTfrontend/hwform.cpp	Wed Jan 14 16:51:55 2009 +0000
@@ -320,9 +320,15 @@
 	ui.Pages->setCurrentIndex(id);
 	OnPageShown(id, curid);
 	
-	if (id == ID_PAGE_NETSERVER || (id == ID_PAGE_ROOMSLIST && !hwnet)) {
+	if (id == ID_PAGE_NETSERVER)
+		GoBack();
+	if ((!hwnet) && (id == ID_PAGE_ROOMSLIST))
 		GoBack();
-	}
+	
+	if ((!hwnet) || (!hwnet->isInRoom()))
+		if (id == ID_PAGE_NETGAME || id == ID_PAGE_NETGAME)
+			GoBack();
+
 	if (id == ID_PAGE_NET) {
 		if(hwnet || pnetserver) NetDisconnect();
 	}