summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp
index 84991d751f..9c391e2be7 100644
--- a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp
+++ b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp
@@ -119,13 +119,15 @@ void *QOffscreenX11Integration::nativeResourceForContext(const QByteArray &resou
if (resource.toLower() == QByteArrayLiteral("glxconfig") ) {
if (context) {
QOffscreenX11GLXContext *glxPlatformContext = static_cast<QOffscreenX11GLXContext *>(context->handle());
- return glxPlatformContext->glxConfig();
+ if (glxPlatformContext)
+ return glxPlatformContext->glxConfig();
}
}
if (resource.toLower() == QByteArrayLiteral("glxcontext") ) {
if (context) {
QOffscreenX11GLXContext *glxPlatformContext = static_cast<QOffscreenX11GLXContext *>(context->handle());
- return glxPlatformContext->glxContext();
+ if (glxPlatformContext)
+ return glxPlatformContext->glxContext();
}
}
return nullptr;