summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <tsdgeos@terra.es>2012-02-22 22:20:44 (GMT)
committerAlbert Astals Cid <tsdgeos@terra.es>2012-02-22 22:21:44 (GMT)
commit04716f9fd185a2f4253bfdac027595f792621558 (patch)
treeee04cc5e159f880bbf5d02439b2d6146db71cee3
parent37b9467299202388fee588a483386f3e3e2ab5fb (diff)
Do not cache end() of a QList you are removing stuff from...
...makes it crash :D BUGS: 294633 FIXED-IN: 4.8.1
-rw-r--r--core/textpage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/textpage.cpp b/core/textpage.cpp
index d4ed89c..53c7dcf 100644
--- a/core/textpage.cpp
+++ b/core/textpage.cpp
@@ -1098,10 +1098,10 @@ static bool doesConsumeY(const QRect& first, const QRect& second, int threshold)
*/
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)
{