diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-10-09 15:02:31 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2019-10-09 15:44:00 +0200 |
commit | 0528ce0a2a4b492d8ad7116654e00e9a2a790700 (patch) | |
tree | 5d5a51fc7009e2e86489ba1f384cda6417668a0d | |
parent | dd23d0b635ffe3f9292e00e15ce7a35e1bb22e71 (diff) |
Fix crash when using `Node.get_as_property_path()`
This closes #32679.
-rw-r--r-- | core/node_path.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/node_path.cpp b/core/node_path.cpp index b43f76f680..970ed100fe 100644 --- a/core/node_path.cpp +++ b/core/node_path.cpp @@ -269,7 +269,7 @@ NodePath NodePath::rel_path_to(const NodePath &p_np) const { NodePath NodePath::get_as_property_path() const { - if (!data->path.size()) { + if (!data || !data->path.size()) { return *this; } else { Vector<StringName> new_path = data->subpath; |