fix crashing caused by merged slider when map doesn't have sliders
This commit is contained in:
parent
a40c8b5d31
commit
961ea097c7
|
@ -1534,7 +1534,9 @@ public class Game extends BasicGameState {
|
||||||
curvepoints.addAll(Arrays.asList(((Slider) gameObject).getCurve().getCurvePoints()));
|
curvepoints.addAll(Arrays.asList(((Slider) gameObject).getCurve().getCurvePoints()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
knorkesliders = new FakeCombinedCurve(curvepoints.toArray(new Vec2f[curvepoints.size()]));
|
if (curvepoints.size() > 0) {
|
||||||
|
knorkesliders = new FakeCombinedCurve(curvepoints.toArray(new Vec2f[curvepoints.size()]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1603,7 +1605,7 @@ public class Game extends BasicGameState {
|
||||||
* @param trackPosition the track position
|
* @param trackPosition the track position
|
||||||
*/
|
*/
|
||||||
private void drawHitObjects(Graphics g, int trackPosition) {
|
private void drawHitObjects(Graphics g, int trackPosition) {
|
||||||
if (Options.isMergingSliders()) {
|
if (Options.isMergingSliders() && knorkesliders != null) {
|
||||||
knorkesliders.draw(Color.white, this.slidercurveFrom, this.slidercurveTo);
|
knorkesliders.draw(Color.white, this.slidercurveFrom, this.slidercurveTo);
|
||||||
}
|
}
|
||||||
// include previous object in follow points
|
// include previous object in follow points
|
||||||
|
|
Loading…
Reference in New Issue
Block a user