Windows: Fix potential NPE
This commit is contained in:
parent
4c817d4145
commit
92b3a7d282
|
@ -300,7 +300,7 @@ final class WindowsDisplay implements DisplayImplementation {
|
||||||
* is maximized helps some gfx recover from fullscreen
|
* is maximized helps some gfx recover from fullscreen
|
||||||
*/
|
*/
|
||||||
try {
|
try {
|
||||||
if (Display.getContext().isCurrent())
|
if (Display.getContext() != null && Display.getContext().isCurrent())
|
||||||
Display.getContext().makeCurrent();
|
Display.getContext().makeCurrent();
|
||||||
} catch (LWJGLException e) {
|
} catch (LWJGLException e) {
|
||||||
LWJGLUtil.log("Exception occurred while trying to make context current: " + e);
|
LWJGLUtil.log("Exception occurred while trying to make context current: " + e);
|
||||||
|
|
Loading…
Reference in New Issue