diff --git a/core/hash_map.h b/core/hash_map.h index c9d3a690e72..9e51292f47e 100644 --- a/core/hash_map.h +++ b/core/hash_map.h @@ -294,14 +294,14 @@ 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; }