From d34bc7f2632af2fe17ea9e0d36d4b9923a7fdeef Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Wed, 22 Feb 2012 23:20:44 +0100 Subject: [PATCH] Do not cache end() of a QList you are removing stuff from... ...makes it crash :D BUGS: 294633 FIXED-IN: 4.8.1 --- core/textpage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/textpage.cpp b/core/textpage.cpp index a5f29f686..4ca116c01 100644 --- a/core/textpage.cpp +++ b/core/textpage.cpp @@ -1147,10 +1147,10 @@ void TextPagePrivate::setWordList(const TextList &list) */ static void removeSpace(TextList *words) { - TextList::Iterator it = words->begin(), itEnd = words->end(); + TextList::Iterator it = words->begin(); const QString str(' '); - while ( it != itEnd ) + while ( it != words->end() ) { if((*it)->text() == str) {