Linux: Added workaround to avoid crash on exit with nvidia drivers

This commit is contained in:
Elias Naur 2006-01-12 12:25:12 +00:00
parent 7e53e81103
commit 63589487d9
1 changed files with 5 additions and 1 deletions

View File

@ -320,7 +320,11 @@ public final class GLContext {
/** The OpenGL library reference count is decremented, and if it reaches 0, the library is unloaded. */
public static synchronized void unloadOpenGLLibrary() {
gl_ref_count--;
if ( gl_ref_count == 0 )
/*
* Unload the native OpenGL library unless we're on linux, since
* some drivers (NVIDIA proprietary) crash on exit when unloading the library.
*/
if (gl_ref_count == 0 && LWJGLUtil.getPlatform() != LWJGLUtil.PLATFORM_LINUX)
nUnloadOpenGLLibrary();
}