diff options
author | Chris Robinson <[email protected]> | 2023-12-11 15:08:12 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-11 15:08:12 -0800 |
commit | ec40e4fefef954544c25285bfeae4a44c1134a44 (patch) | |
tree | 72b55e01fd50bed966db533713f998cf06815172 /core | |
parent | a28bf538afabca45298a43e5d2acf3e6149a2c2c (diff) |
Finish cleanup for effects
Diffstat (limited to 'core')
-rw-r--r-- | core/effectslot.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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<EffectSlotArray*>(ptr), count); + if(void *ptr{al_calloc(alignof(EffectSlotArray), EffectSlotArray::Sizeof(count*2))}) + return al::construct_at(static_cast<EffectSlotArray*>(ptr), count); + return nullptr; } |