aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKahrl <kahrl@gmx.net>2014-12-13 00:39:07 +0100
committerKahrl <kahrl@gmx.net>2014-12-13 00:39:07 +0100
commitc4624639e6c58184ebad49aa2c914612abc1ff9b (patch)
tree8c91ab5350bba476c1c1dbaba8c6d4f6f39ba654 /src
parent581efea60e8fad18b9a2fc9d544f014e2ac693f8 (diff)
downloadminetest-c4624639e6c58184ebad49aa2c914612abc1ff9b.tar.gz
minetest-c4624639e6c58184ebad49aa2c914612abc1ff9b.tar.bz2
minetest-c4624639e6c58184ebad49aa2c914612abc1ff9b.zip
Fix segfault when dragging mouse out of mainmenu window (#1910)
Diffstat (limited to 'src')
-rw-r--r--src/guiFormSpecMenu.cpp3
1 files changed, 2 insertions, 1 deletions
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<s32>(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();