SVN commit 815384 by rjarosz: Backport commit 815383. Can't use the itEnd iterator if we erase item from list, because the iterator is invalid. CCBUG: 162956 M +2 -6 kprotocolcombo.cpp --- branches/KDE/4.0/kdelibs/kfile/kprotocolcombo.cpp #815383:815384 @@ -36,15 +36,11 @@ { qSort(m_protocols); QStringList::iterator it = m_protocols.begin(); - QStringList::iterator itEnd = m_protocols.end(); menu = new QMenu(this); - while (it != itEnd) { + while (it != m_protocols.end()) { const KUrl url(*it + "://"); if (!KProtocolManager::supportsListing(url)) { - QStringList::iterator tempIt = it; - ++tempIt; - m_protocols.erase(it); - it = tempIt; + it = m_protocols.erase(it); } else { ++it; }