diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index 8ba90f073f0..a8c41adbfb0 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -294,6 +294,7 @@ void VisualScript::_node_ports_changed(int p_id) { void VisualScript::add_node(const StringName &p_func, int p_id, const Ref &p_node, const Point2 &p_pos) { ERR_FAIL_COND(instances.size()); ERR_FAIL_COND(!functions.has(p_func)); + ERR_FAIL_COND(p_node.is_null()); for (Map::Element *E = functions.front(); E; E = E->next()) { ERR_FAIL_COND(E->get().nodes.has(p_id)); //id can exist only one in script, even for different functions