diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2019-10-25 14:20:01 +0200 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2020-07-01 10:50:13 +0100 |
commit | 1b05f449f0584ff29a9f340b1c7c310a52aec7b1 (patch) | |
tree | adc5a34ee95fcfa3f6014b9384fdb5b59b2a69e6 | |
parent | 719609522a30fa9e3b96b028ac5a1d1a65f1678f (diff) | |
download | redot-engine-1b05f449f0584ff29a9f340b1c7c310a52aec7b1.tar.gz |
Call CRASH_COND_MSG if key not found in HashMap get function.
-rw-r--r-- | core/hash_map.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/hash_map.h b/core/hash_map.h index 843430d082..10fc931e7a 100644 --- a/core/hash_map.h +++ b/core/hash_map.h @@ -280,13 +280,13 @@ public: const TData &get(const TKey &p_key) const { const TData *res = getptr(p_key); - ERR_FAIL_COND_V(!res, *res); + CRASH_COND_MSG(!res, "Map key not found."); return *res; } TData &get(const TKey &p_key) { TData *res = getptr(p_key); - ERR_FAIL_COND_V(!res, *res); + CRASH_COND_MSG(!res, "Map key not found."); return *res; } |