Linux: Added sanity check to LinuxDisplay.getDisplay()
This commit is contained in:
parent
dd76a4b0d8
commit
8c5f601e31
|
@ -258,7 +258,7 @@ final class LinuxDisplay implements DisplayImplementation {
|
|||
if (display_connection_usage_count < 0)
|
||||
throw new InternalError("display_connection_usage_count < 0: " + display_connection_usage_count);
|
||||
if (display_connection_usage_count == 0) {
|
||||
closeDisplay(getDisplay());
|
||||
closeDisplay(display);
|
||||
display = 0;
|
||||
GLContext.unloadOpenGLLibrary();
|
||||
}
|
||||
|
@ -281,6 +281,8 @@ final class LinuxDisplay implements DisplayImplementation {
|
|||
}
|
||||
|
||||
static long getDisplay() {
|
||||
if (display_connection_usage_count <= 0)
|
||||
throw new InternalError("display_connection_usage_count = " + display_connection_usage_count);
|
||||
return display;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue