summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-10-27 08:38:06 +0100
committerGitHub <noreply@github.com>2020-10-27 08:38:06 +0100
commit1a1140d92b21d4b567c7ecf342986938366540e2 (patch)
tree8af2a6ad293edf6511a670e29a0ac92486d017a5
parentc11992ed487a8c869917177fe89d750ea0d1975b (diff)
parent0dfe28d93dd652635af2ffc289a577eb0c282ca2 (diff)
Merge pull request #43118 from timothyqiu/revert-inherited-default
Fix property revert for inherited child nodes
-rw-r--r--editor/editor_inspector.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 601f0ad735..1837b23a0b 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -414,9 +414,9 @@ bool EditorPropertyRevert::get_instanced_node_original_property(Node *p_node, co
node = node->get_owner();
}
- if (!found && node) {
+ if (!found && p_node) {
//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) {
found = true;
value = attempt;