From ec40e4fefef954544c25285bfeae4a44c1134a44 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 11 Dec 2023 15:08:12 -0800 Subject: Finish cleanup for effects --- core/effectslot.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core/effectslot.cpp') diff --git a/core/effectslot.cpp b/core/effectslot.cpp index 99224225..4d1e14b3 100644 --- a/core/effectslot.cpp +++ b/core/effectslot.cpp @@ -14,6 +14,7 @@ EffectSlotArray *EffectSlot::CreatePtrArray(size_t count) noexcept /* Allocate space for twice as many pointers, so the mixer has scratch * space to store a sorted list during mixing. */ - void *ptr{al_calloc(alignof(EffectSlotArray), EffectSlotArray::Sizeof(count*2))}; - return al::construct_at(static_cast(ptr), count); + if(void *ptr{al_calloc(alignof(EffectSlotArray), EffectSlotArray::Sizeof(count*2))}) + return al::construct_at(static_cast(ptr), count); + return nullptr; } -- cgit v1.2.3