Przeglądaj źródła

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

Fix crash when using `Node.get_as_property_path()`
Rémi Verschelde 6 lat temu
rodzic
commit
123a6b8019
1 zmienionych plików z 1 dodań i 1 usunięć
  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;