diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp
index bd4a7c0d5b7935232caecce14c4e3a78312c4838..6ef20ceade5cd634b595c5dad525cba63a3bc09a 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();