aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alAuxEffectSlot.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-12-02 15:29:26 -0800
committerChris Robinson <[email protected]>2018-12-02 15:29:26 -0800
commit45b65366bb2ba6c11756e2509589e310b9f0df88 (patch)
tree5525a1c5f3bdc9d850e75036415c8e562489d406 /OpenAL32/alAuxEffectSlot.cpp
parent60254488e9faa2934e9d261328a3c0359056bdd0 (diff)
Improve some checks for compiler analysis
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.cpp')
-rw-r--r--OpenAL32/alAuxEffectSlot.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/OpenAL32/alAuxEffectSlot.cpp b/OpenAL32/alAuxEffectSlot.cpp
index 7f05187e..ad33fe50 100644
--- a/OpenAL32/alAuxEffectSlot.cpp
+++ b/OpenAL32/alAuxEffectSlot.cpp
@@ -577,6 +577,7 @@ void EffectState::DecRef() noexcept
ALenum InitEffectSlot(ALeffectslot *slot)
{
EffectStateFactory *factory{getFactoryByType(slot->Effect.Type)};
+ if(!factory) return AL_INVALID_VALUE;
slot->Effect.State = factory->create();
if(!slot->Effect.State) return AL_OUT_OF_MEMORY;