summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-02-12 14:06:08 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2019-02-12 22:19:38 +0000
commit81fd7f4c8af260d753a834480f790c82fb161889 (patch)
treeba7ce914552afb40c4df160d208edef787091426 /src/plugins
parent38504041148f2d1cffea6520ea448dd4171adb0b (diff)
macOS: Add auto-release pool during QCocoaScreen::deliverUpdateRequests()
Checking the application's keyWindow will autorelease the window, and there's no root pool in place when called from the display-link thread. Change-Id: Ic43164ad6397c92b858fb549f7a00e28b6110849 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/cocoa/qcocoascreen.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoascreen.mm b/src/plugins/platforms/cocoa/qcocoascreen.mm
index 80dd7e40d3..830a387fd1 100644
--- a/src/plugins/platforms/cocoa/qcocoascreen.mm
+++ b/src/plugins/platforms/cocoa/qcocoascreen.mm
@@ -269,6 +269,8 @@ struct DeferredDebugHelper
void QCocoaScreen::deliverUpdateRequests()
{
+ QMacAutoReleasePool pool;
+
// The CVDisplayLink callback is a notification that it's a good time to produce a new frame.
// Since the callback is delivered on a separate thread we have to marshal it over to the
// main thread, as Qt requires update requests to be delivered there. This needs to happen