1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-21 21:17:49 +02:00

Fix crash on hiding empty map/save list

This commit is contained in:
Ivan Savenko 2024-05-11 13:09:40 +00:00
parent 1bc7c29111
commit 87e4756f6d

@ -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();
});