From 76aa838e8efd36213e7b3e26d248e4f20b46a0b2 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 2 Aug 2023 22:48:40 +0200 Subject: [PATCH] source/Platform/Win32/Win32GLContext.cpp: in isActive() make sure this function returns false if m_renderContext is null. --- source/Platform/Win32/Win32GLContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Platform/Win32/Win32GLContext.cpp b/source/Platform/Win32/Win32GLContext.cpp index c9b1c25..5a02f8a 100644 --- a/source/Platform/Win32/Win32GLContext.cpp +++ b/source/Platform/Win32/Win32GLContext.cpp @@ -139,7 +139,7 @@ bool Win32GLContext::deactivate() bool Win32GLContext::isActive() const { - return ::wglGetCurrentContext() == m_renderContext; + return m_renderContext != NULL && ::wglGetCurrentContext() == m_renderContext; } bool Win32GLContext::setSwapInterval(int interval)