diff options
author | George Marques <george@gmarqu.es> | 2017-08-09 11:28:32 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-09 11:28:32 -0300 |
commit | b5c6b0cf1c3d644321ed134dbb26e111d6dbd43f (patch) | |
tree | dfbcd3960bf4ec275dd3b2a5fed37e7d0d3a1ffb /modules/nativescript | |
parent | df5d01f2599d557e568936d389d46a5393c7e9a4 (diff) | |
parent | 9d4887e74b34f6ca42808498d089c12660a73fce (diff) |
Merge pull request #10205 from endragor/nativescript-base-defaults
Fix getting default values for NativeScript base type properties
Diffstat (limited to 'modules/nativescript')
-rw-r--r-- | modules/nativescript/nativescript.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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<MethodInfo> *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<StringName, NativeScriptDesc::Property>::Element *P = script_data->properties.find(p_property); - + Map<StringName, NativeScriptDesc::Property>::Element *P = NULL; + while (!P && script_data) { + P = script_data->properties.find(p_property); + script_data = script_data->base_data; + } if (!P) return false; |