diff options
Diffstat (limited to 'src/corelib/kernel/qcoreglobaldata.cpp')
-rw-r--r-- | src/corelib/kernel/qcoreglobaldata.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/kernel/qcoreglobaldata.cpp b/src/corelib/kernel/qcoreglobaldata.cpp index c3ca2f74e4..104be1b87b 100644 --- a/src/corelib/kernel/qcoreglobaldata.cpp +++ b/src/corelib/kernel/qcoreglobaldata.cpp @@ -57,7 +57,10 @@ QCoreGlobalData::~QCoreGlobalData() { #if QT_CONFIG(textcodec) codecForLocale = 0; - for (QList<QTextCodec *>::const_iterator it = allCodecs.constBegin(); it != allCodecs.constEnd(); ++it) + QList<QTextCodec *> tmp = allCodecs; + allCodecs.clear(); + codecCache.clear(); + for (QList<QTextCodec *>::const_iterator it = tmp.constBegin(); it != tmp.constEnd(); ++it) delete *it; #endif } |