diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-07-07 10:35:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-07 10:35:03 +0200 |
commit | 8ec6c075bd38620358c1cadafa1a515a5711695a (patch) | |
tree | e73d6e3572ac5df1bfaf35b9140d10c39aa2f9ce /editor | |
parent | 28a3dee276d64d7c2bf1c7d54ebbb5a6b82caf4a (diff) | |
parent | d9e4327e34a347a9004b9742a8f4e148446549ae (diff) |
Merge pull request #62792 from dpalais/return_option_value
Diffstat (limited to 'editor')
-rw-r--r-- | editor/import/resource_importer_scene.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index a9c43e573f..a5920ef98d 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -144,11 +144,11 @@ Variant EditorScenePostImportPlugin::get_option_value(const StringName &p_name) ERR_FAIL_COND_V_MSG(current_options == nullptr && current_options_dict == nullptr, Variant(), "get_option_value called from a function where option values are not available."); ERR_FAIL_COND_V_MSG(current_options && !current_options->has(p_name), Variant(), "get_option_value called with unexisting option argument: " + String(p_name)); ERR_FAIL_COND_V_MSG(current_options_dict && !current_options_dict->has(p_name), Variant(), "get_option_value called with unexisting option argument: " + String(p_name)); - if (current_options) { - (*current_options)[p_name]; + if (current_options && current_options->has(p_name)) { + return (*current_options)[p_name]; } - if (current_options_dict) { - (*current_options_dict)[p_name]; + if (current_options_dict && current_options_dict->has(p_name)) { + return (*current_options_dict)[p_name]; } return Variant(); } |