Skip to content

Commit

Permalink
Merge pull request #5956 from peppy/fix-drawable-audio-wrapper-deadlock
Browse files Browse the repository at this point in the history
Fix `DrawableAudioWrapper` deadlock by moving unbind to `UnbindAllBindables`
  • Loading branch information
smoogipoo authored Jul 31, 2023
2 parents e40d447 + 96f0666 commit eb6a632
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions osu.Framework/Graphics/Audio/DrawableAudioWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,16 @@ protected virtual void OnMixerChanged(ValueChangedEvent<IAudioMixer> mixer)
{
}

protected override void Dispose(bool isDisposing)
internal override void UnbindAllBindables()
{
base.Dispose(isDisposing);
base.UnbindAllBindables();

component?.UnbindAdjustments(adjustments);
}

protected override void Dispose(bool isDisposing)
{
base.Dispose(isDisposing);
if (disposeUnderlyingComponentOnDispose)
(component as IDisposable)?.Dispose();

Expand Down

0 comments on commit eb6a632

Please sign in to comment.