From be37d52f188b73ce2e6ae58cad60f0400da61d68 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 20 Sep 2023 19:57:56 +0200 Subject: GraphUI GlyphShape.addShapeToRegion(): In case the Font.Glyph has no shape, at least add an empty region to avoid an NPE --- src/graphui/classes/com/jogamp/graph/ui/shapes/GlyphShape.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/graphui') diff --git a/src/graphui/classes/com/jogamp/graph/ui/shapes/GlyphShape.java b/src/graphui/classes/com/jogamp/graph/ui/shapes/GlyphShape.java index 4cdf4f613..55a19949a 100644 --- a/src/graphui/classes/com/jogamp/graph/ui/shapes/GlyphShape.java +++ b/src/graphui/classes/com/jogamp/graph/ui/shapes/GlyphShape.java @@ -180,6 +180,9 @@ public class GlyphShape extends GraphShape { region.addOutlineShape(shape, tmp, rgbaColor); box.resize(tmp.transform(sbox, new AABBox())); setRotationPivot( box.getCenter() ); + } else { + // needs a dummy 'region' + resetGLRegion(glp, gl, null, regionVertCount, regionIdxCount); } } -- cgit v1.2.3