diff options
author | Chris Robinson <[email protected]> | 2023-12-11 18:59:54 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-11 18:59:54 -0800 |
commit | 60aa22f20d63a3da9f06b9398a2a8656ebbd0342 (patch) | |
tree | c6067ff97fd013906309d2fafd5e41a5447fee29 /alc/context.cpp | |
parent | e79e5a978df22a5e5967169cf62cf46f3456d833 (diff) |
Mostly finish cleanup for backends
Except CoreAudio and Solaris backends
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(); |