diff --git a/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglCanvas.java b/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglCanvas.java index 77c8ef3c4..94d00fcf0 100644 --- a/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglCanvas.java +++ b/engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglCanvas.java @@ -227,12 +227,14 @@ public class LwjglCanvas extends LwjglAbstractDisplay implements JmeCanvasContex } } - renderer.resetGLObjects(); logger.log(Level.INFO, "OGL: Creating display.."); // Set renderable to true, since canvas is now displayable. renderable.set(true); createContext(settings); + + // must call after createContext, as renderer might be null + renderer.resetGLObjects(); logger.log(Level.INFO, "OGL: Waiting for display to become active.."); while (!Display.isCreated()){