diff --git a/engine/src/niftygui/com/jme3/niftygui/RenderFontJme.java b/engine/src/niftygui/com/jme3/niftygui/RenderFontJme.java index 0bfef504c..41182de9e 100644 --- a/engine/src/niftygui/com/jme3/niftygui/RenderFontJme.java +++ b/engine/src/niftygui/com/jme3/niftygui/RenderFontJme.java @@ -52,6 +52,9 @@ public class RenderFontJme implements RenderFont { public RenderFontJme(String name, NiftyJmeDisplay display) { this.display = display; font = display.getAssetManager().loadFont(name); + if (font == null) { + throw new RuntimeException( "Font not loaded:" + name ); + } text = new BitmapText(font); actualSize = font.getPreferredSize(); text.setSize(actualSize);