Linux: Added sanity check to LinuxDisplay.getDisplay()

This commit is contained in:
Elias Naur 2006-10-23 14:05:40 +00:00
parent dd76a4b0d8
commit 8c5f601e31
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}