瀏覽代碼

Merge pull request #10527 from hpvb/fix-10517

Add null check to ScriptEditor get_current_tab_control() call
Rémi Verschelde 8 年之前
父節點
當前提交
dd07a15fc6
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      editor/plugins/script_editor_plugin.cpp

+ 4 - 1
editor/plugins/script_editor_plugin.cpp

@@ -2072,7 +2072,10 @@ void ScriptEditor::_update_selected_editor_menu() {
 		}
 		}
 	}
 	}
 
 
-	EditorHelp *eh = tab_container->get_current_tab_control()->cast_to<EditorHelp>();
+	EditorHelp *eh = NULL;
+	if (tab_container->get_current_tab_control())
+		eh = tab_container->get_current_tab_control()->cast_to<EditorHelp>();
+
 	if (eh) {
 	if (eh) {
 		script_search_menu->show();
 		script_search_menu->show();
 	} else {
 	} else {