diff options
author | Sven Gothel <[email protected]> | 2023-09-20 19:57:56 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-09-20 19:57:56 +0200 |
commit | be37d52f188b73ce2e6ae58cad60f0400da61d68 (patch) | |
tree | 5153a6d943a1ff3c6b97728255c95902ca3853f3 /src/graphui | |
parent | 5eabbd8d3fc2b1e670b7641575efefe3fe235980 (diff) |
GraphUI GlyphShape.addShapeToRegion(): In case the Font.Glyph has no shape, at least add an empty region to avoid an NPE
Diffstat (limited to 'src/graphui')
-rw-r--r-- | src/graphui/classes/com/jogamp/graph/ui/shapes/GlyphShape.java | 3 |
1 files changed, 3 insertions, 0 deletions
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); } } |