NullPointer in org.newdawn.slick.geom.Line ctor

Issue #44 new
Perry Fraser
created an issue

Build 237

This line throws a NullPointerException:

graphics.draw(new Line(new float[]{0, 0}, new float[]{10, 10}));

This is because the start and end Vector2f have not been initialized.

Stack Trace:

java.lang.NullPointerException
    at org.newdawn.slick.geom.Line.set(Line.java:217)
    at org.newdawn.slick.geom.Line.set(Line.java:138)
    at org.newdawn.slick.geom.Line.<init>(Line.java:112)
    at MyCircle.render(MyCircle.java:60)
    at MainClass.render(MainClass.java:85)
    at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:688)
    at org.newdawn.slick.AppGameContainer.gameLoop(AppGameContainer.java:411)
    at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:321)

Comments (0)

  1. Log in to comment