Fix 'bad dynamic cast' for when slot-0 is empty

This commit is contained in:
tomcw 2024-03-22 23:16:37 +00:00
parent abfdb8e0db
commit 105537e4e0

View File

@ -567,7 +567,8 @@ void LanguageCardManager::SetMemModeFromSnapshot(void)
saturn.SetMemMainLanguageCard();
}
dynamic_cast<LanguageCardUnit&>(GetCardMgr().GetRef(m_lastSlotToSetMainMemLCFromSnapshot)).SetGlobalLCMemMode();
if (GetCardMgr().QuerySlot(m_lastSlotToSetMainMemLCFromSnapshot) != CT_Empty)
dynamic_cast<LanguageCardUnit&>(GetCardMgr().GetRef(m_lastSlotToSetMainMemLCFromSnapshot)).SetGlobalLCMemMode();
}
bool LanguageCardManager::SetLanguageCard(SS_CARDTYPE type)