summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/tools/qlocale.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 136bafa..dc61adb 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -1156,7 +1156,7 @@ static void getMacPreferredLanguageAndCountry(QString *language, QString *countr
kCFPreferencesAnyApplication,
kCFPreferencesCurrentUser,
kCFPreferencesAnyHost);
- if (CFArrayGetCount(languages) > 0) {
+ if (languages && CFArrayGetCount(languages) > 0) {
QCFType<CFLocaleRef> locale = CFLocaleCreate(kCFAllocatorDefault,
CFStringRef(CFArrayGetValueAtIndex(languages, 0)));
if (language)