check if dimLevel is null on exit

This commit is contained in:
n4b3l 2016-12-19 14:03:10 +01:00
parent 7f9ad9adf0
commit 09f9f86b06

View File

@ -158,7 +158,8 @@ namespace osu.Game.Screens.Play
protected override bool OnExiting(GameMode next)
{
dimLevel.ValueChanged -= dimChanged;
if(dimLevel != null)
dimLevel.ValueChanged -= dimChanged;
Background?.FadeTo(1f, 200);
return base.OnExiting(next);
}