summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/tools/qlocale_mac.mm3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/tools/qlocale_mac.mm b/src/corelib/tools/qlocale_mac.mm
index 8594cfd40d..9292dccf19 100644
--- a/src/corelib/tools/qlocale_mac.mm
+++ b/src/corelib/tools/qlocale_mac.mm
@@ -438,6 +438,9 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
kCFPreferencesCurrentUser,
kCFPreferencesAnyHost);
QStringList result;
+ if (!languages)
+ return QVariant(result);
+
CFTypeID typeId = CFGetTypeID(languages);
if (typeId == CFArrayGetTypeID()) {
const int cnt = CFArrayGetCount(languages.as<CFArrayRef>());