Skip to content

Commit

Permalink
Fixed null pointer for malformed hit object types in beatmaps. (#258)
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
  • Loading branch information
itdelatrisu committed Feb 21, 2017
1 parent e3a4d37 commit c6b6f21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/itdelatrisu/opsu/states/Game.java
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit c6b6f21

Please # to comment.