aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-12-11 15:08:12 -0800
committerChris Robinson <[email protected]>2023-12-11 15:08:12 -0800
commitec40e4fefef954544c25285bfeae4a44c1134a44 (patch)
tree72b55e01fd50bed966db533713f998cf06815172 /core
parenta28bf538afabca45298a43e5d2acf3e6149a2c2c (diff)
Finish cleanup for effects
Diffstat (limited to 'core')
-rw-r--r--core/effectslot.cpp5
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;
}