1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 19:42:55 +08:00

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;
using osu.Framework.Input.Bindings; using osu.Framework.Input.Bindings;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
namespace osu.Game.Screens.Menu namespace osu.Game.Input
{ {
public class IdleTracker : Component, IKeyBindingHandler<PlatformAction> public class IdleTracker : Component, IKeyBindingHandler<PlatformAction>
{ {

View File

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

View File

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