summaryrefslogtreecommitdiff
path: root/core/io
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2019-09-26 23:16:44 -0300
committerJuan Linietsky <reduzio@gmail.com>2020-02-11 12:02:36 +0100
commit4aea9f74e650743fe6585d5230dd6e5f6c94c478 (patch)
tree5ee02ffbe4ec128317e3c7cdca4861f6a39fb382 /core/io
parent263bebe0237b85b1343ba17b117c8c43287ecc57 (diff)
Rewritten StreamTexture for better code reuse, added basis universal support
Diffstat (limited to 'core/io')
-rw-r--r--core/io/config_file.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/io/config_file.cpp b/core/io/config_file.cpp
index 74e85d0cc0..5968972143 100644
--- a/core/io/config_file.cpp
+++ b/core/io/config_file.cpp
@@ -86,9 +86,10 @@ void ConfigFile::set_value(const String &p_section, const String &p_key, const V
Variant ConfigFile::get_value(const String &p_section, const String &p_key, Variant p_default) const {
if (!values.has(p_section) || !values[p_section].has(p_key)) {
- ERR_FAIL_COND_V_MSG(p_default.get_type() == Variant::NIL, p_default, "Couldn't find the given section/key and no default was given.");
+ ERR_FAIL_COND_V_MSG(p_default.get_type() == Variant::NIL, Variant(), "Couldn't find the given section '" + p_section + "', key '" + p_key + "' and no default was given.");
return p_default;
}
+
return values[p_section][p_key];
}