diff options
-rw-r--r-- | src/core/delegated_frame_node.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp index baf064025..b122a3333 100644 --- a/src/core/delegated_frame_node.cpp +++ b/src/core/delegated_frame_node.cpp @@ -454,7 +454,7 @@ DelegatedFrameNode::DelegatedFrameNode() #if defined(USE_X11) && !defined(QT_NO_OPENGL) QOpenGLContext *currentContext = QOpenGLContext::currentContext() ; QOpenGLContext *sharedContext = qt_gl_global_share_context(); - if (!QOpenGLContext::areSharing(currentContext, sharedContext)) { + if (currentContext && sharedContext && !QOpenGLContext::areSharing(currentContext, sharedContext)) { static bool allowNotSharedContextWarningShown = true; if (allowNotSharedContextWarningShown) { allowNotSharedContextWarningShown = false; |