Linux: try to work around crash on opengl library unload

This commit is contained in:
Elias Naur 2005-04-25 07:47:28 +00:00
parent a1e593cee0
commit e492cd240b
1 changed files with 2 additions and 0 deletions

View File

@ -66,6 +66,7 @@ final class LinuxDisplay implements DisplayImplementation {
*/
static void incDisplay() throws LWJGLException {
if (display_connection_usage_count == 0) {
GLContext.loadOpenGLLibrary();
openDisplay();
}
display_connection_usage_count++;
@ -77,6 +78,7 @@ final class LinuxDisplay implements DisplayImplementation {
throw new InternalError("display_connection_usage_count < 0: " + display_connection_usage_count);
if (display_connection_usage_count == 0) {
closeDisplay();
GLContext.unloadOpenGLLibrary();
}
}