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>
This commit is contained in:
Chris Meyer 2011-12-16 16:41:59 -08:00 committed by Qt by Nokia
parent e299832dbf
commit b13f630c81

View File

@ -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) {