diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-10-22 16:29:29 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2018-10-23 07:21:24 +0000 |
commit | ebfad73b4e44fe6db8059200da105b4b87888718 (patch) | |
tree | a0ef581a2e5ce5a0ca9eea22dfef7d3a833c2cf7 /src/plugins/platforms/cocoa/qcocoaglcontext.mm | |
parent | c0538857358e57c1551f7d10c07a9bb80d848cd7 (diff) |
macOS: Fix NSOpenGLContext view association check
The expression "m_context.view = view" always evaluates to the view,
so the check was flawed.
Change-Id: Icef4ba5244975ccd78a151c7d40c53b2364c6148
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaglcontext.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaglcontext.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaglcontext.mm b/src/plugins/platforms/cocoa/qcocoaglcontext.mm index 1e1b3907ed..1cd77a22e4 100644 --- a/src/plugins/platforms/cocoa/qcocoaglcontext.mm +++ b/src/plugins/platforms/cocoa/qcocoaglcontext.mm @@ -414,7 +414,8 @@ bool QCocoaGLContext::setDrawable(QPlatformSurface *surface) // have the same effect as an update. // Now we are ready to associate the view with the context - if ((m_context.view = view) != view) { + m_context.view = view; + if (m_context.view != view) { qCInfo(lcQpaOpenGLContext) << "Failed to set" << view << "as drawable for" << m_context; m_updateObservers.clear(); return false; |