mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Fix crash on hiding empty map/save list
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user