1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Add null check guards to unsubscriptions in Dispose()

This commit is contained in:
Bartłomiej Dach 2022-04-07 21:37:42 +02:00
parent 04db80848b
commit 71c0216c55
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497
2 changed files with 6 additions and 2 deletions

View File

@ -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;
}
}
}

View File

@ -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;
}
}
}