summaryrefslogtreecommitdiff
path: root/modules/visual_script
diff options
context:
space:
mode:
authorK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2018-11-05 13:15:42 -0800
committerK. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>2018-11-06 11:11:23 -0800
commitef781810730e1f22c194baa9cff2c76874f2f86e (patch)
treec271a3e631451e8c2b0807a91beb815aaf26bd61 /modules/visual_script
parent3cf3c4137a4e6a5e25d7950ff727ec2157e40a37 (diff)
Fix empty script interface crash on tscn load.
Add fail conditions to protect the visual script function and also fix the initiating cause.
Diffstat (limited to 'modules/visual_script')
-rw-r--r--modules/visual_script/visual_script_editor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index a80a015ed3..03f3e67e5d 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();
}