1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 19:27:31 +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);
}