summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-08-16 15:30:16 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-08-16 15:30:16 (GMT)
commit6e39638936503b6898769ffe3ab0d5e7e6718b23 (patch)
tree1f23ff37f0345dbb4a9ba4769f722c03a7fb34ca /src
parent18e60ed7e49c08ac216d7ee17a18f5af17333115 (diff)
parentcc98710df73a590c37dca19bd3aa9fcd9bbd5a92 (diff)
downloadQt-6e39638936503b6898769ffe3ab0d5e7e6718b23.zip
Qt-6e39638936503b6898769ffe3ab0d5e7e6718b23.tar.gz
Qt-6e39638936503b6898769ffe3ab0d5e7e6718b23.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: don't crash when destroying codec list
Diffstat (limited to 'src')
-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 0a37f27..263b5f9 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