path: root/src/plugins
diff options
authorChris Meyer <>2011-12-16 16:41:59 -0800
committerQt by Nokia <>2011-12-19 09:53:42 +0100
commitb13f630c8188b7b7571a5df001a395b9e6790a28 (patch)
tree6011c41edbe341635815281b1950224dbef6b8fe /src/plugins
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 <>
Diffstat (limited to 'src/plugins')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/ b/src/plugins/platforms/cocoa/
index 388e56db8e..0ea47d7f3b 100644
--- a/src/plugins/platforms/cocoa/
+++ b/src/plugins/platforms/cocoa/
@@ -143,7 +143,7 @@ QT_USE_NAMESPACE
- if (qApp->macEventFilter(0, reinterpret_cast<EventRef>(event)))
+ if (qApp && qApp->macEventFilter(0, reinterpret_cast<EventRef>(event)))
return true;
if ([event type] == NSApplicationDefined) {