From c6b6f21f14070bcd1b8deba718b38459fc5002de Mon Sep 17 00:00:00 2001 From: Jeffrey Han Date: Tue, 21 Feb 2017 11:38:35 -0500 Subject: [PATCH] Fixed null pointer for malformed hit object types in beatmaps. (#258) Signed-off-by: Jeffrey Han --- src/itdelatrisu/opsu/states/Game.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/itdelatrisu/opsu/states/Game.java b/src/itdelatrisu/opsu/states/Game.java index 54a05b59..6292ee8f 100644 --- a/src/itdelatrisu/opsu/states/Game.java +++ b/src/itdelatrisu/opsu/states/Game.java @@ -1496,6 +1496,8 @@ else if (hitObject.isSlider()) gameObjects[i] = new Slider(hitObject, this, data, color, comboEnd); else if (hitObject.isSpinner()) gameObjects[i] = new Spinner(hitObject, this, data); + else // invalid hit object, use a dummy GameObject + gameObjects[i] = new DummyObject(hitObject); } catch (Exception e) { // try to handle the error gracefully: substitute in a dummy GameObject ErrorHandler.error(String.format("Failed to create %s at index %d:\n%s",