From: <eli...@us...> - 2006-10-23 14:05:47
|
Revision: 2592 http://svn.sourceforge.net/java-game-lib/?rev=2592&view=rev Author: elias_naur Date: 2006-10-23 07:05:40 -0700 (Mon, 23 Oct 2006) Log Message: ----------- Linux: Added sanity check to LinuxDisplay.getDisplay() Modified Paths: -------------- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java =================================================================== --- trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2006-10-23 13:58:33 UTC (rev 2591) +++ trunk/LWJGL/src/java/org/lwjgl/opengl/LinuxDisplay.java 2006-10-23 14:05:40 UTC (rev 2592) @@ -258,7 +258,7 @@ 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 @@ } static long getDisplay() { + if (display_connection_usage_count <= 0) + throw new InternalError("display_connection_usage_count = " + display_connection_usage_count); return display; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |