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