Browse Source

Fix possible crash on closing game from main menu

Ivan Savenko 1 year ago
parent
commit
d6ff7896fe
1 changed files with 3 additions and 1 deletions
  1. 3 1
      client/Client.cpp

+ 3 - 1
client/Client.cpp

@@ -348,7 +348,9 @@ void CClient::save(const std::string & fname)
 
 
 void CClient::endNetwork()
 void CClient::endNetwork()
 {
 {
-	CGI->mh->endNetwork();
+	if (CGI->mh)
+		CGI->mh->endNetwork();
+
 	if (CPlayerInterface::battleInt)
 	if (CPlayerInterface::battleInt)
 		CPlayerInterface::battleInt->endNetwork();
 		CPlayerInterface::battleInt->endNetwork();