diff options
author | Chris Robinson <[email protected]> | 2020-12-28 08:04:23 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-12-28 08:04:23 -0800 |
commit | aae115c35a2b1899cfcaf443aa9a6da9b7647258 (patch) | |
tree | 66c551b2523c69ff1206978467d3887c803054ea /al/auxeffectslot.cpp | |
parent | 15e05fcef882e3d50104db39d38019165c7995f9 (diff) |
Return an intrusive_ptr from EffectStateFactory::create
Diffstat (limited to 'al/auxeffectslot.cpp')
-rw-r--r-- | al/auxeffectslot.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp index 80b4bb16..ed8fb6f1 100644 --- a/al/auxeffectslot.cpp +++ b/al/auxeffectslot.cpp @@ -911,8 +911,7 @@ ALenum ALeffectslot::init() EffectStateFactory *factory{getFactoryByType(Effect.Type)}; if(!factory) return AL_INVALID_VALUE; - Effect.State.reset(factory->create()); - if(!Effect.State) return AL_OUT_OF_MEMORY; + Effect.State = factory->create(); Effect.State->add_ref(); mSlot.mEffectState = Effect.State.get(); |