summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/node_path.cpp2
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;