summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qplatformbackingstore.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gui/painting/qplatformbackingstore.cpp b/src/gui/painting/qplatformbackingstore.cpp
index 0d550887d9..8e50059ca4 100644
--- a/src/gui/painting/qplatformbackingstore.cpp
+++ b/src/gui/painting/qplatformbackingstore.cpp
@@ -237,7 +237,11 @@ void QPlatformBackingStore::composeAndFlush(QWindow *window, const QRegion &regi
{
Q_UNUSED(offset);
- context->makeCurrent(window);
+ if (!context->makeCurrent(window)) {
+ qWarning("composeAndFlush: makeCurrent() failed");
+ return;
+ }
+
QOpenGLFunctions *funcs = context->functions();
funcs->glViewport(0, 0, window->width() * window->devicePixelRatio(), window->height() * window->devicePixelRatio());
funcs->glClearColor(0, 0, 0, translucentBackground ? 0 : 1);