diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2021-08-02 23:36:13 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2021-08-02 23:36:13 +0800 |
commit | 0ca38ffe766de1debfd44211db2c8b9265baffba (patch) | |
tree | 83773fe1d0ae07f2e1f59e35ba21c9246ead8030 /modules | |
parent | 2db45b62c0a4aaac11852a6f2183d3bf7db935ba (diff) |
Validates VisualScript.add_node input node
Diffstat (limited to 'modules')
-rw-r--r-- | modules/visual_script/visual_script.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index 7a2404fd80..86793af77f 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -271,6 +271,7 @@ void VisualScript::_node_ports_changed(int p_id) { void VisualScript::add_node(int p_id, const Ref<VisualScriptNode> &p_node, const Point2 &p_pos) { ERR_FAIL_COND(instances.size()); ERR_FAIL_COND(nodes.has(p_id)); // ID can exist only one in script. + ERR_FAIL_COND(p_node.is_null()); NodeData nd; nd.node = p_node; |