Cocoa (OpenGL): If no view is attached, makeCurrent() should return false
Change-Id: Ie2869fae1549c3b0a8ef78702410e6ca0c980737 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
parent
a199a87ad5
commit
2eb1e28a90
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user