From 60aa22f20d63a3da9f06b9398a2a8656ebbd0342 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 11 Dec 2023 18:59:54 -0800 Subject: Mostly finish cleanup for backends Except CoreAudio and Solaris backends --- alc/context.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'alc/context.cpp') diff --git a/alc/context.cpp b/alc/context.cpp index 92e458cb..2def58ba 100644 --- a/alc/context.cpp +++ b/alc/context.cpp @@ -164,9 +164,13 @@ void ALCcontext::init() else { auxslots = EffectSlot::CreatePtrArray(1); - (*auxslots)[0] = mDefaultSlot->mSlot; - mDefaultSlot->mState = SlotState::Playing; + if(auxslots) + { + (*auxslots)[0] = mDefaultSlot->mSlot; + mDefaultSlot->mState = SlotState::Playing; + } } + if(!auxslots) throw std::bad_alloc{}; mActiveAuxSlots.store(auxslots, std::memory_order_relaxed); allocVoiceChanges(); -- cgit v1.2.3