summaryrefslogtreecommitdiffstats
path: root/src/core/delegated_frame_node.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-02-01 12:00:12 +0100
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-02-01 18:16:48 +0000
commit2daa442d8202c11e2f925991176ae1f6a6a978a6 (patch)
treedd1b1f7ba0bb6f2ddef5dbbcb488481a6f997ce0 /src/core/delegated_frame_node.cpp
parent35c38346e65fe26c75bbe08c7002f645ea53fec1 (diff)
Avoid crash in desktop linux with --disable-gpu
Don't try to access null OpenGL contexts. Change-Id: I7d0e607e8d29d3cfba8d6e98cd142b951c960281 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/delegated_frame_node.cpp')
-rw-r--r--src/core/delegated_frame_node.cpp2
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;