Running hellowindow and closing its windows one by one would result
in crashes without the additional checks for the presence of the
underlying native window.
Change-Id: Id32bdfda9a77936380b2e9a95fb56ceb52028d9d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
if (window == m_currentWindow.data())
return;
- if (m_currentWindow)
+ if (m_currentWindow && m_currentWindow.data()->handle())
static_cast<QCocoaWindow *>(m_currentWindow.data()->handle())->setCurrentContext(0);
Q_ASSERT(window->handle());
void QCocoaGLContext::doneCurrent()
{
- if (m_currentWindow)
+ if (m_currentWindow && m_currentWindow.data()->handle())
static_cast<QCocoaWindow *>(m_currentWindow.data()->handle())->setCurrentContext(0);
m_currentWindow.clear();