SVN commit 1076771 by ahartmetz: This hopefully fixes an assert failure when nothing is wrong; bug reported by teve on IRC. M +4 -5 scheduler.cpp --- trunk/KDE/kdelibs/kio/kio/scheduler.cpp #1076770:1076771 @@ -164,8 +164,6 @@ } - - int HostQueue::lowestSerial() const { QMap::ConstIterator first = m_queuedJobs.constBegin(); @@ -479,9 +477,10 @@ // we have dequeued the not yet running job with the lowest serial Q_ASSERT(!jobPriv->m_slave); Q_ASSERT(prevRunningJobs == hq.runningJobsCount()); - const bool removed = m_queuesBySerial.remove(prevLowestSerial); - Q_UNUSED(removed); - Q_ASSERT(removed); + if (m_queuesBySerial.remove(prevLowestSerial) == 0) { + // make sure that the queue was not scheduled for a good reason + Q_ASSERT(hq.runningJobsCount() == m_maxConnectionsPerHost); + } } else { if (prevRunningJobs != hq.runningJobsCount()) { // we have dequeued a previously running job