From 9d4887e74b34f6ca42808498d089c12660a73fce Mon Sep 17 00:00:00 2001 From: Ruslan Mustakov Date: Wed, 9 Aug 2017 20:37:37 +0700 Subject: Fix getting default values for NativeScript base type properties --- modules/nativescript/nativescript.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'modules/nativescript') diff --git a/modules/nativescript/nativescript.cpp b/modules/nativescript/nativescript.cpp index f00917bcea..2212c73766 100644 --- a/modules/nativescript/nativescript.cpp +++ b/modules/nativescript/nativescript.cpp @@ -317,11 +317,11 @@ void NativeScript::get_script_signal_list(List *r_signals) const { bool NativeScript::get_property_default_value(const StringName &p_property, Variant &r_value) const { NativeScriptDesc *script_data = get_script_desc(); - if (!script_data) - return false; - - Map::Element *P = script_data->properties.find(p_property); - + Map::Element *P = NULL; + while (!P && script_data) { + P = script_data->properties.find(p_property); + script_data = script_data->base_data; + } if (!P) return false; -- cgit v1.2.3