Bläddra i källkod

Merge pull request #43118 from timothyqiu/revert-inherited-default

Fix property revert for inherited child nodes
Rémi Verschelde 4 år sedan
förälder
incheckning
1a1140d92b
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      editor/editor_inspector.cpp

+ 2 - 2
editor/editor_inspector.cpp

@@ -414,9 +414,9 @@ bool EditorPropertyRevert::get_instanced_node_original_property(Node *p_node, co
 		node = node->get_owner();
 		node = node->get_owner();
 	}
 	}
 
 
-	if (!found && node) {
+	if (!found && p_node) {
 		//if not found, try default class value
 		//if not found, try default class value
-		Variant attempt = ClassDB::class_get_default_property_value(node->get_class_name(), p_prop);
+		Variant attempt = ClassDB::class_get_default_property_value(p_node->get_class_name(), p_prop);
 		if (attempt.get_type() != Variant::NIL) {
 		if (attempt.get_type() != Variant::NIL) {
 			found = true;
 			found = true;
 			value = attempt;
 			value = attempt;