summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Meyer <cmeyer1969@gmail.com>2011-12-16 16:41:59 -0800
committerQt by Nokia <qt-info@nokia.com>2011-12-19 09:53:42 +0100
commitb13f630c8188b7b7571a5df001a395b9e6790a28 (patch)
tree6011c41edbe341635815281b1950224dbef6b8fe
parente299832dbf3e2227200e7317805f7773d60fcbba (diff)
Add check to make sure qApp exists before using
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 <morten.sorvig@nokia.com>
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplication.mm2
1 files changed, 1 insertions, 1 deletions
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<EventRef>(event)))
+ if (qApp && qApp->macEventFilter(0, reinterpret_cast<EventRef>(event)))
return true;
if ([event type] == NSApplicationDefined) {