summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@digia.com>2013-11-04 16:12:38 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-05 17:37:05 +0100
commit2eb1e28a90eaf82f4405dc65584021f16415014b (patch)
treefc1e9ee6a206990cf3f453897f82ccf909ee8da3 /src
parenta199a87ad5452938482291ba5e2995e220678f7d (diff)
Cocoa (OpenGL): If no view is attached, makeCurrent() should return false
Change-Id: Ie2869fae1549c3b0a8ef78702410e6ca0c980737 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaglcontext.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.mm b/src/plugins/platforms/cocoa/qcocoaglcontext.mm
index 3dee137038..f709c94c6d 100644
--- a/src/plugins/platforms/cocoa/qcocoaglcontext.mm
+++ b/src/plugins/platforms/cocoa/qcocoaglcontext.mm
@@ -112,6 +112,8 @@ bool QCocoaGLContext::makeCurrent(QPlatformSurface *surface)
QWindow *window = static_cast<QCocoaWindow *>(surface)->window();
setActiveWindow(window);
+ if (![m_context view])
+ return false;
[m_context makeCurrentContext];
update();
return true;