From e8b94679057cad2857f53138ef52cfdce97970d6 Mon Sep 17 00:00:00 2001 From: sapier Date: Sun, 25 Aug 2013 10:48:29 +0200 Subject: [PATCH] Fix crash on lua exception --- src/guiFormSpecMenu.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp index b162e8e9..bc33143a 100644 --- a/src/guiFormSpecMenu.cpp +++ b/src/guiFormSpecMenu.cpp @@ -124,11 +124,14 @@ void GUIFormSpecMenu::removeChildren() if(e != NULL) e->remove(); }*/ + if(m_tooltip_element) { m_tooltip_element->remove(); + m_tooltip_element->drop(); m_tooltip_element = NULL; } + } 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->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_CENTER); 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 -- 2.30.2