Fix possible null current screen in overworld

This commit is contained in:
Benau 2019-07-06 01:40:05 +08:00
parent 1bcb16bafb
commit 5e2f75a078

View File

@ -852,7 +852,9 @@ EventPropagation EventHandler::onGUIEvent(const SEvent& event)
if (w == NULL) break;
if (!w->isActivated())
{
GUIEngine::getCurrentScreen()->onDisabledItemClicked(w->m_properties[PROP_ID].c_str());
// Some dialog in overworld could have deactivated widget, and no current screen in overworld
if (GUIEngine::getCurrentScreen())
GUIEngine::getCurrentScreen()->onDisabledItemClicked(w->m_properties[PROP_ID].c_str());
return EVENT_BLOCK;
}