diff options
Diffstat (limited to 'alc/alu.cpp')
-rw-r--r-- | alc/alu.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/alc/alu.cpp b/alc/alu.cpp index a5172fb7..aed79b14 100644 --- a/alc/alu.cpp +++ b/alc/alu.cpp @@ -476,8 +476,7 @@ bool CalcEffectSlotParams(ALeffectslot *slot, ALeffectslot **sorted_slots, ALCco slot->Params.AirAbsorptionGainHF = 1.0f; } - EffectState *state{props->State}; - props->State = nullptr; + EffectState *state{props->State.release()}; EffectState *oldstate{slot->Params.mEffectState}; slot->Params.mEffectState = state; @@ -502,7 +501,7 @@ bool CalcEffectSlotParams(ALeffectslot *slot, ALeffectslot **sorted_slots, ALCco * cleaned up sometime later (not ideal, but better than blocking * or leaking). */ - props->State = oldstate; + props->State.reset(oldstate); } } |