Fix crash when using Node.get_as_property_path()

This closes #32679.
This commit is contained in:
Hugo Locurcio 2019-10-09 15:02:31 +02:00
parent dd23d0b635
commit 0528ce0a2a
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C

View file

@ -269,7 +269,7 @@ NodePath NodePath::rel_path_to(const NodePath &p_np) const {
NodePath NodePath::get_as_property_path() const { NodePath NodePath::get_as_property_path() const {
if (!data->path.size()) { if (!data || !data->path.size()) {
return *this; return *this;
} else { } else {
Vector<StringName> new_path = data->subpath; Vector<StringName> new_path = data->subpath;