* Fix NPE in LwjglCanvas.restoreCanvas()

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7361 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..om 14 years ago
parent c407296ccb
commit a4e0e634c1
  1. 4
      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()){

Loading…
Cancel
Save