summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-08-18 09:01:28 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2011-08-18 09:01:28 (GMT)
commitd9b8c530fceced62ab620307f399c3e985640282 (patch)
treeb53c8043d7c244437ec8655f4186e26f34ce7a5b /src/corelib
parent182b10dbad23e9da310c0d600095f17c41dd0d3c (diff)
parent5e435bfcad5a05c775c9d45edbd2659c87416754 (diff)
downloadQt-d9b8c530fceced62ab620307f399c3e985640282.zip
Qt-d9b8c530fceced62ab620307f399c3e985640282.tar.gz
Qt-d9b8c530fceced62ab620307f399c3e985640282.tar.bz2
Merge remote-tracking branch 'mainline/4.8'
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/codecs/qtextcodec.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp
index 985f515..dd06a2a 100644
--- a/src/corelib/codecs/qtextcodec.cpp
+++ b/src/corelib/codecs/qtextcodec.cpp
@@ -213,12 +213,13 @@ QTextCodecCleanup::~QTextCodecCleanup()
destroying_is_ok = true;
#endif
- for (QList<QTextCodec *>::const_iterator it = all->constBegin()
- ; it != all->constEnd(); ++it) {
+ QList<QTextCodec *> *myAll = all;
+ all = 0; // Otherwise the d'tor destroys the iterator
+ for (QList<QTextCodec *>::const_iterator it = myAll->constBegin()
+ ; it != myAll->constEnd(); ++it) {
delete *it;
}
- delete all;
- all = 0;
+ delete myAll;
localeMapper = 0;
#ifdef Q_DEBUG_TEXTCODEC