From: Kahrl Date: Fri, 12 Dec 2014 23:39:07 +0000 (+0100) Subject: Fix segfault when dragging mouse out of mainmenu window (#1910) X-Git-Tag: 0.4.11~37 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c4624639e6c58184ebad49aa2c914612abc1ff9b;p=oweals%2Fminetest.git Fix segfault when dragging mouse out of mainmenu window (#1910) --- diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp index bd4a7c0d5..6ef20cead 100644 --- a/src/guiFormSpecMenu.cpp +++ b/src/guiFormSpecMenu.cpp @@ -2772,7 +2772,8 @@ bool GUIFormSpecMenu::preprocessEvent(const SEvent& event) gui::IGUIElement *hovered = Environment->getRootGUIElement()->getElementFromPoint( core::position2d(x, y)); - if (hovered->getType() == gui::EGUIET_TAB_CONTROL) { + if (hovered && isMyChild(hovered) && + hovered->getType() == gui::EGUIET_TAB_CONTROL) { gui::IGUISkin* skin = Environment->getSkin(); assert(skin != NULL); gui::IGUIFont *old_font = skin->getFont();