summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qopenglcontext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qopenglcontext.cpp')
-rw-r--r--src/gui/kernel/qopenglcontext.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index 2d7a62996c..b3ce22448d 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -290,7 +290,9 @@ void QOpenGLContext::swapBuffers(QSurface *surface)
return;
}
- d->platformGLContext->swapBuffers(surface->surfaceHandle());
+ QPlatformSurface *surfaceHandle = surface->surfaceHandle();
+ if (surfaceHandle)
+ d->platformGLContext->swapBuffers(surfaceHandle);
}
void (*QOpenGLContext::getProcAddress(const QByteArray &procName)) ()