mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-06 15:04:41 +00:00
Linux: Added sanity check to LinuxDisplay.getDisplay()
This commit is contained in:
parent
dd76a4b0d8
commit
8c5f601e31
1 changed files with 3 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue