1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-12 00:27:25 +08:00

Use null propagation

This commit is contained in:
EVAST9919 2017-11-07 03:26:47 +03:00
parent 1063e18566
commit 60e6177b7f

View File

@ -119,15 +119,13 @@ namespace osu.Game.Overlays.Profile
protected override bool OnHover(InputState state)
{
if (graph != null)
graph.ShowBall(ToLocalSpace(state.Mouse.NativeState.Position).X);
graph?.ShowBall(ToLocalSpace(state.Mouse.NativeState.Position).X);
return base.OnHover(state);
}
protected override bool OnMouseMove(InputState state)
{
if (graph != null)
graph.MoveBall(ToLocalSpace(state.Mouse.NativeState.Position).X);
graph?.MoveBall(ToLocalSpace(state.Mouse.NativeState.Position).X);
return base.OnMouseMove(state);
}