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

...makes it crash :D
BUGS: 294633
FIXED-IN: 4.8.1
remotes/origin/KDE/4.9
Albert Astals Cid 14 years ago
parent cee823fa35
commit d34bc7f263
  1. 4
      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)
{

Loading…
Cancel
Save