Linux: try to work around crash on opengl library unload
This commit is contained in:
parent
a1e593cee0
commit
e492cd240b
|
@ -66,6 +66,7 @@ final class LinuxDisplay implements DisplayImplementation {
|
||||||
*/
|
*/
|
||||||
static void incDisplay() throws LWJGLException {
|
static void incDisplay() throws LWJGLException {
|
||||||
if (display_connection_usage_count == 0) {
|
if (display_connection_usage_count == 0) {
|
||||||
|
GLContext.loadOpenGLLibrary();
|
||||||
openDisplay();
|
openDisplay();
|
||||||
}
|
}
|
||||||
display_connection_usage_count++;
|
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);
|
throw new InternalError("display_connection_usage_count < 0: " + display_connection_usage_count);
|
||||||
if (display_connection_usage_count == 0) {
|
if (display_connection_usage_count == 0) {
|
||||||
closeDisplay();
|
closeDisplay();
|
||||||
|
GLContext.unloadOpenGLLibrary();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue