diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-14 21:56:22 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-14 21:57:22 -0300 |
commit | 5dde810aa58d66677afda9cc5c89c052e91348b4 (patch) | |
tree | 8d4e996125ab529260aaae9c396456ae2c66e094 /core/path_remap.cpp | |
parent | a1d07fd6d6a21ca6a3366aa7c9024dc41e3d323c (diff) | |
download | redot-engine-5dde810aa58d66677afda9cc5c89c052e91348b4.tar.gz |
no more errors related to missing GlobalConfig::Get (or so I hope)
Diffstat (limited to 'core/path_remap.cpp')
-rw-r--r-- | core/path_remap.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/core/path_remap.cpp b/core/path_remap.cpp index 42383e212d..646c1c497b 100644 --- a/core/path_remap.cpp +++ b/core/path_remap.cpp @@ -124,7 +124,10 @@ void PathRemap::clear_remaps() { void PathRemap::load_remaps() { // default remaps first - PoolVector<String> remaps = GlobalConfig::get_singleton()->get("remap/all"); + PoolVector<String> remaps; + if (GlobalConfig::get_singleton()->has("remap/all")) { + remaps = GlobalConfig::get_singleton()->get("remap/all"); + } { int rlen = remaps.size(); @@ -141,7 +144,11 @@ void PathRemap::load_remaps() { // platform remaps second, so override - remaps = GlobalConfig::get_singleton()->get("remap/"+OS::get_singleton()->get_name()); + if (GlobalConfig::get_singleton()->has("remap/"+OS::get_singleton()->get_name())) { + remaps = GlobalConfig::get_singleton()->get("remap/"+OS::get_singleton()->get_name()); + } else { + remaps.resize(0); + } //remaps = Globals::get_singleton()->get("remap/PSP"); { int rlen = remaps.size(); |