summaryrefslogtreecommitdiffstats
path: root/core/os/memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/os/memory.h')
-rw-r--r--core/os/memory.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/os/memory.h b/core/os/memory.h
index 45019894b1..a0524b0ea2 100644
--- a/core/os/memory.h
+++ b/core/os/memory.h
@@ -144,7 +144,7 @@ T *memnew_arr_template(size_t p_elements) {
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_constructible<T>::value) {