Windows: Fix potential NPE

This commit is contained in:
Elias Naur 2006-11-24 15:10:15 +00:00
parent 4c817d4145
commit 92b3a7d282
1 changed files with 1 additions and 1 deletions

View File

@ -300,7 +300,7 @@ final class WindowsDisplay implements DisplayImplementation {
* is maximized helps some gfx recover from fullscreen
*/
try {
if (Display.getContext().isCurrent())
if (Display.getContext() != null && Display.getContext().isCurrent())
Display.getContext().makeCurrent();
} catch (LWJGLException e) {
LWJGLUtil.log("Exception occurred while trying to make context current: " + e);