2
0
Эх сурвалжийг харах

Fix crash on hiding empty map/save list

Ivan Savenko 1 жил өмнө
parent
commit
87e4756f6d

+ 2 - 2
client/lobby/CLobbyScreen.cpp

@@ -50,7 +50,7 @@ CLobbyScreen::CLobbyScreen(ESelectionScreen screenType)
 		buttonSelect->addCallback([=]()
 		{
 			toggleTab(tabSel);
-			if (getMapInfo()->isRandomMap)
+			if (getMapInfo() && getMapInfo()->isRandomMap)
 				CSH->setMapInfo(tabSel->getSelectedMapInfo());
 		});
 
@@ -78,7 +78,7 @@ CLobbyScreen::CLobbyScreen(ESelectionScreen screenType)
 		buttonRMG->addCallback([this]()
 		{
 			toggleTab(tabRand);
-			if (!getMapInfo()->isRandomMap)
+			if (getMapInfo() && !getMapInfo()->isRandomMap)
 				tabRand->updateMapInfoByHost();
 		});