From 44bcaf06f9582ee2cc6cba037c8c9e4b94117448 Mon Sep 17 00:00:00 2001 From: yugecin Date: Sun, 20 Nov 2016 22:27:16 +0100 Subject: [PATCH] fix npe caused be last commit changes --- src/itdelatrisu/opsu/states/Game.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/itdelatrisu/opsu/states/Game.java b/src/itdelatrisu/opsu/states/Game.java index e99ecf54..d9de92da 100644 --- a/src/itdelatrisu/opsu/states/Game.java +++ b/src/itdelatrisu/opsu/states/Game.java @@ -856,12 +856,14 @@ public class Game extends BasicGameState { } GameObject g = gameObjects[objectIndex]; - if ((g.isCircle() || g.isSlider()) && g.getTime() <= trackPosition) { - Cursor.lastObjColor = g.getColor(); - Cursor.lastMirroredObjColor = g.getMirroredColor(); - } else { - Cursor.nextObjColor = g.getColor(); - Cursor.nextMirroredObjColor = g.getMirroredColor(); + if (g.isCircle() || g.isSlider()) { + if (g.getTime() <= trackPosition) { + Cursor.lastObjColor = g.getColor(); + Cursor.lastMirroredObjColor = g.getMirroredColor(); + } else { + Cursor.nextObjColor = g.getColor(); + Cursor.nextMirroredObjColor = g.getMirroredColor(); + } } // timing points