mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 13:15:08 +08:00
Fix possible idleTracker nullref
This commit is contained in:
parent
bdba22a576
commit
baf9e028c3
@ -6,7 +6,7 @@ using osu.Framework.Input;
|
||||
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>
|
||||
{
|
@ -26,6 +26,7 @@ using osu.Framework.Platform;
|
||||
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;
|
||||
|
@ -14,6 +14,7 @@ using osu.Framework.Input.Bindings;
|
||||
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 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
if (idleTracker.IdleTime > 6000 && State != ButtonSystemState.Exit)
|
||||
if (idleTracker?.IdleTime > 6000 && State != ButtonSystemState.Exit)
|
||||
State = ButtonSystemState.Initial;
|
||||
|
||||
base.Update();
|
||||
|
Loading…
Reference in New Issue
Block a user