mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:07:52 +08:00
Add null check guards to unsubscriptions in Dispose()
This commit is contained in:
parent
04db80848b
commit
71c0216c55
@ -133,7 +133,9 @@ namespace osu.Game.Storyboards.Drawables
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
skin.SourceChanged -= skinSourceChanged;
|
||||
|
||||
if (skin != null)
|
||||
skin.SourceChanged -= skinSourceChanged;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -110,7 +110,9 @@ namespace osu.Game.Storyboards.Drawables
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
skin.SourceChanged -= skinSourceChanged;
|
||||
|
||||
if (skin != null)
|
||||
skin.SourceChanged -= skinSourceChanged;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user