VisualScript: Fix crash with get_node().

This commit is contained in:
Andreas Haas 2017-10-06 21:24:00 +02:00
parent b368ce1719
commit dfb6602da0
No known key found for this signature in database
GPG Key ID: B5FFAE1B65FBD2E1

View File

@ -861,7 +861,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
names.push_back(TTR("Assign"));
names.push_back(TTR("Clear"));
if (owner->is_class("Node") && (v.get_type() == Variant::NODE_PATH) && Object::cast_to<Node>(owner)->has_node(v))
if (owner && owner->is_class("Node") && (v.get_type() == Variant::NODE_PATH) && Object::cast_to<Node>(owner)->has_node(v))
names.push_back(TTR("Select Node"));
config_action_buttons(names);