summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/offscreen
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/offscreen')
-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 c866a55dc0..bb4d8aeaa1 100644
--- a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp
+++ b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.cpp
@@ -118,13 +118,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;