Fix crash on lua exception

master
sapier 2013-08-25 10:48:29 +02:00 committed by Kahrl
parent 7860097eda
commit e8b9467905
1 changed files with 5 additions and 0 deletions

View File

@ -124,11 +124,14 @@ void GUIFormSpecMenu::removeChildren()
if(e != NULL) if(e != NULL)
e->remove(); e->remove();
}*/ }*/
if(m_tooltip_element) if(m_tooltip_element)
{ {
m_tooltip_element->remove(); m_tooltip_element->remove();
m_tooltip_element->drop();
m_tooltip_element = NULL; m_tooltip_element = NULL;
} }
} }
void GUIFormSpecMenu::setInitialFocus() void GUIFormSpecMenu::setInitialFocus()
@ -1606,6 +1609,8 @@ void GUIFormSpecMenu::regenerateGui(v2u32 screensize)
m_tooltip_element->setOverrideColor(video::SColor(255,255,255,255)); m_tooltip_element->setOverrideColor(video::SColor(255,255,255,255));
m_tooltip_element->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_CENTER); m_tooltip_element->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_CENTER);
m_tooltip_element->setWordWrap(false); m_tooltip_element->setWordWrap(false);
//we're not parent so no autograb for this one!
m_tooltip_element->grab();
} }
//set initial focus if parser didn't set it //set initial focus if parser didn't set it