diff options
Diffstat (limited to 'alc/context.cpp')
-rw-r--r-- | alc/context.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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(); |