From b13f630c8188b7b7571a5df001a395b9e6790a28 Mon Sep 17 00:00:00 2001 From: Chris Meyer Date: Fri, 16 Dec 2011 16:41:59 -0800 Subject: Add check to make sure qApp exists before using MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Check for qApp before using. I'm aware that this is in commented out code right now; but I wanted to make sure it doesn't accidently slip back in without this check so I'm submitting this patch. It caused problems at shutdown in 4.8. Change-Id: I1c2358ab94f8b698e5519b3e0f988fb5cdd653fa Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoaapplication.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/plugins/platforms/cocoa/qcocoaapplication.mm b/src/plugins/platforms/cocoa/qcocoaapplication.mm index 388e56db8e..0ea47d7f3b 100644 --- a/src/plugins/platforms/cocoa/qcocoaapplication.mm +++ b/src/plugins/platforms/cocoa/qcocoaapplication.mm @@ -143,7 +143,7 @@ QT_USE_NAMESPACE { Q_UNUSED(event); /* - if (qApp->macEventFilter(0, reinterpret_cast(event))) + if (qApp && qApp->macEventFilter(0, reinterpret_cast(event))) return true; if ([event type] == NSApplicationDefined) { -- cgit v1.2.3