summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-01-15 15:10:20 +0100
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-01-28 12:37:14 +0000
commitf939c3728cc2d7c6946b62f45e8401542e3fe1a0 (patch)
tree78c703b28e96d7ca3f3abf7add0f2ffb3ff312b9 /src
parent5582851c33a768cfe63a418da0bf0df69260f227 (diff)
Bail out in composeAndFlush when makeCurrent fails
And show a warning so we have a chance of knowing what happened. Change-Id: I9ddf3842b7d19946876ac1a2375611e8c13bbb9a Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Diffstat (limited to 'src')
-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);