Explorar o código

Merge pull request #32682 from Calinou/fix-nodepath-crash

Fix crash when using `Node.get_as_property_path()`
Rémi Verschelde %!s(int64=6) %!d(string=hai) anos
pai
achega
123a6b8019
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      core/node_path.cpp

+ 1 - 1
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;