Delete the OpenGL context before the window.
Fix a crash-on-exit on Mac, where deleting the context references the attached NSView. Change-Id: Iac38184dab7a406e4072452fd9a6b175e6968ade Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
This commit is contained in:
parent
669588484f
commit
07549de92b
@ -959,6 +959,8 @@ void QWidgetPrivate::deleteTLSysExtra()
|
||||
#ifndef QT_NO_OPENGL
|
||||
if (textureChildSeen && extra->topextra->shareContext)
|
||||
extra->topextra->shareContext->doneCurrent();
|
||||
delete extra->topextra->shareContext;
|
||||
extra->topextra->shareContext = 0;
|
||||
#endif
|
||||
|
||||
//the toplevel might have a context with a "qglcontext associated with it. We need to
|
||||
@ -972,10 +974,6 @@ void QWidgetPrivate::deleteTLSysExtra()
|
||||
delete extra->topextra->window;
|
||||
extra->topextra->window = 0;
|
||||
|
||||
#ifndef QT_NO_OPENGL
|
||||
delete extra->topextra->shareContext;
|
||||
extra->topextra->shareContext = 0;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user