summaryrefslogtreecommitdiff
path: root/vcl/opengl/gdiimpl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/opengl/gdiimpl.cxx')
-rw-r--r--vcl/opengl/gdiimpl.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 80ba872b4fc5..342a8028cd01 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -2103,6 +2103,15 @@ void OpenGLSalGraphicsImpl::doFlush()
assert( mpWindowContext.is() );
+ if( !mpWindowContext.is() )
+ {
+ // failed to create a GL context for this window:
+ // eg. mis-matching pixel formats, underlying window
+ // resource lifecycle, etc.
+ VCL_GL_INFO( "Failed to create window context" );
+ return;
+ }
+
// Interesting ! -> this destroys a context [ somehow ] ...
mpWindowContext->makeCurrent();
CHECK_GL_ERROR();