summaryrefslogtreecommitdiffstats
path: root/include/godot_cpp/core/memory.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/godot_cpp/core/memory.hpp')
-rw-r--r--include/godot_cpp/core/memory.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/godot_cpp/core/memory.hpp b/include/godot_cpp/core/memory.hpp
index dd4a155..548f330 100644
--- a/include/godot_cpp/core/memory.hpp
+++ b/include/godot_cpp/core/memory.hpp
@@ -146,7 +146,7 @@ T *memnew_arr_template(size_t p_elements, const char *p_descr = "") {
size_t len = sizeof(T) * p_elements;
uint64_t *mem = (uint64_t *)Memory::alloc_static(len, true);
T *failptr = nullptr; // Get rid of a warning.
- ERR_FAIL_COND_V(!mem, failptr);
+ ERR_FAIL_NULL_V(mem, failptr);
*(mem - 1) = p_elements;
if (!std::is_trivially_destructible<T>::value) {