summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qlocale.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qlocale.cpp')
-rw-r--r--src/corelib/tools/qlocale.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 51b886b0e0..86b73bf634 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -2371,6 +2371,8 @@ QString QLocale::toString(double i, char f, int prec) const
QLocale QLocale::system()
{
QT_PREPEND_NAMESPACE(systemData)(); // trigger updating of the system data if necessary
+ if (systemLocalePrivate.isDestroyed())
+ return QLocale(QLocale::C);
return QLocale(*systemLocalePrivate->data());
}