Check for null mode

This commit is contained in:
Elias Naur 2004-07-03 13:02:45 +00:00
parent 33611232f3
commit d0fce51ebb
1 changed files with 2 additions and 0 deletions

View File

@ -153,6 +153,8 @@ public final class Display {
* @throws LWJGLException if the display mode could not be set
*/
public static void setDisplayMode(DisplayMode mode) throws LWJGLException {
if (mode == null)
throw new NullPointerException("mode must be non-null");
current_mode = mode;
if (isCreated()) {
destroyWindow();