Validates VisualScript.add_node input node
(cherry picked from commit 0ca38ffe76
)
This commit is contained in:
parent
ea0116b01f
commit
812076baf6
1 changed files with 1 additions and 0 deletions
|
@ -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<VisualScriptNode> &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<StringName, Function>::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
|
||||
|
|
Loading…
Reference in a new issue