From 2c5bdd6b2810d9fd19f358d92cf63e03cefeec2d Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Sun, 8 May 2011 05:32:14 +0200 Subject: Graph/JOGL: Avoid NPE --- src/jogl/classes/com/jogamp/graph/geom/Outline.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/jogl/classes/com/jogamp/graph') diff --git a/src/jogl/classes/com/jogamp/graph/geom/Outline.java b/src/jogl/classes/com/jogamp/graph/geom/Outline.java index b0ad86fda..6c1557f7b 100644 --- a/src/jogl/classes/com/jogamp/graph/geom/Outline.java +++ b/src/jogl/classes/com/jogamp/graph/geom/Outline.java @@ -154,7 +154,7 @@ public class Outline implements Cloneable, Comparable { */ public final void setClosed(boolean closed) { this.closed = closed; - if(closed){ + if( closed && !isEmpty() ) { Vertex first = vertices.get(0); Vertex last = getLastVertex(); if(!VectorUtil.checkEquality(first.getCoord(), last.getCoord())){ -- cgit v1.2.3