Check for null mode
This commit is contained in:
parent
33611232f3
commit
d0fce51ebb
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue