Pārlūkot izejas kodu

Fix crash on hiding empty map/save list

Ivan Savenko 1 gadu atpakaļ
vecāks
revīzija
87e4756f6d
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      client/lobby/CLobbyScreen.cpp

+ 2 - 2
client/lobby/CLobbyScreen.cpp

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