From ef781810730e1f22c194baa9cff2c76874f2f86e Mon Sep 17 00:00:00 2001 From: "K. S. Ernest (iFire) Lee" Date: Mon, 5 Nov 2018 13:15:42 -0800 Subject: [PATCH] Fix empty script interface crash on tscn load. Add fail conditions to protect the visual script function and also fix the initiating cause. --- modules/visual_script/visual_script_editor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp index a80a015ed3ca..03f3e67e5ddf 100644 --- a/modules/visual_script/visual_script_editor.cpp +++ b/modules/visual_script/visual_script_editor.cpp @@ -765,6 +765,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) { } void VisualScriptEditor::_update_members() { + ERR_FAIL_COND(!script.is_valid()); updating_members = true; @@ -3061,7 +3062,7 @@ void VisualScriptEditor::_notification(int p_what) { } } - if (is_visible_in_tree()) { + if (is_visible_in_tree() && script.is_valid()) { _update_members(); _update_graph(); }