From 28f689271737d98a23c18b5be2f7f8e1988c1268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 15 Jun 2020 23:22:31 +0200 Subject: macOS: Check that platform window is valid after delivering close event MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: QTBUG-78814 Pick-to: 5.15 Change-Id: I551024c5d777999f7c79d21fd7b7de061c18f971 Reviewed-by: Timur Pocheptsov Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qnsview_mouse.mm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/platforms/cocoa/qnsview_mouse.mm') diff --git a/src/plugins/platforms/cocoa/qnsview_mouse.mm b/src/plugins/platforms/cocoa/qnsview_mouse.mm index 9e2761f850..b42f2d0e7e 100644 --- a/src/plugins/platforms/cocoa/qnsview_mouse.mm +++ b/src/plugins/platforms/cocoa/qnsview_mouse.mm @@ -400,6 +400,8 @@ selfClosed = self == popup->view(); QWindowSystemInterface::handleCloseEvent(popup->window()); QWindowSystemInterface::flushWindowSystemEvents(); + if (!m_platformWindow) + return; // Bail out if window was destroyed } // Consume the mouse event when closing the popup, except for tool tips // were it's expected that the event is processed normally. -- cgit v1.2.3