Commit 04716f9f authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Do not cache end() of a QList you are removing stuff from...

...makes it crash :D
BUGS: 294633
FIXED-IN: 4.8.1
parent 37b94672
......@@ -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)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment