summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/opengl/win/gdiimpl.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/vcl/opengl/win/gdiimpl.cxx b/vcl/opengl/win/gdiimpl.cxx
index 86e5bd4b958a..96f0b8bce57d 100644
--- a/vcl/opengl/win/gdiimpl.cxx
+++ b/vcl/opengl/win/gdiimpl.cxx
@@ -114,7 +114,9 @@ void WinOpenGLContext::makeCurrent()
if (!wglMakeCurrent(m_aGLWin.hDC, m_aGLWin.hRC))
{
g_bAnyCurrent = false;
- SAL_WARN("vcl.opengl", "wglMakeCurrent failed: " << WindowsErrorString(GetLastError()));
+ DWORD nLastError = GetLastError();
+ if (nLastError != ERROR_SUCCESS)
+ SAL_WARN("vcl.opengl", "wglMakeCurrent failed: " << WindowsErrorString(nLastError));
return;
}