Browse Source

* Fix for x window crash on Display.destroy() on linux

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8011 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
Sha..om 14 years ago
parent
commit
c77f1c6cfb
1 changed files with 4 additions and 1 deletions
  1. 4 1
      engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglCanvas.java

+ 4 - 1
engine/src/lwjgl-ogl/com/jme3/system/lwjgl/LwjglCanvas.java

@@ -286,8 +286,11 @@ public class LwjglCanvas extends LwjglAbstractDisplay implements JmeCanvasContex
                 // NOTE: On Windows XP, not calling setParent(null)
                 // NOTE: On Windows XP, not calling setParent(null)
                 // freezes the application.
                 // freezes the application.
                 // On Mac it freezes the application.
                 // On Mac it freezes the application.
+                // On Linux it fixes a crash with X Window System.
                 if (JmeSystem.getPlatform() == Platform.Windows32
                 if (JmeSystem.getPlatform() == Platform.Windows32
-                 || JmeSystem.getPlatform() == Platform.Windows64){
+                 || JmeSystem.getPlatform() == Platform.Windows64
+                 || JmeSystem.getPlatform() == Platform.Linux32
+                 || JmeSystem.getPlatform() == Platform.Linux64){
                     Display.setParent(null);
                     Display.setParent(null);
                 }
                 }
             } catch (LWJGLException ex) {
             } catch (LWJGLException ex) {