Fix possible idleTracker nullref

This commit is contained in:
Roman Kapustin 2018-09-26 19:44:01 +03:00
parent bdba22a576
commit baf9e028c3
3 changed files with 4 additions and 2 deletions

View File

@ -6,7 +6,7 @@
using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events;
namespace osu.Game.Screens.Menu
namespace osu.Game.Input
{
public class IdleTracker : Component, IKeyBindingHandler<PlatformAction>
{

View File

@ -26,6 +26,7 @@
using osu.Framework.Threading;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Input;
using osu.Game.Rulesets.Scoring;
using osu.Game.Overlays.Notifications;
using osu.Game.Rulesets;

View File

@ -14,6 +14,7 @@
using osu.Framework.Logging;
using osu.Framework.Threading;
using osu.Game.Graphics;
using osu.Game.Input;
using osu.Game.Input.Bindings;
using osu.Game.Overlays;
using OpenTK;
@ -269,7 +270,7 @@ private void updateLogoState(ButtonSystemState lastState = ButtonSystemState.Ini
protected override void Update()
{
if (idleTracker.IdleTime > 6000 && State != ButtonSystemState.Exit)
if (idleTracker?.IdleTime > 6000 && State != ButtonSystemState.Exit)
State = ButtonSystemState.Initial;
base.Update();