From 240a1632a9c30cd28dd9ee7c1bd7f4241738973c Mon Sep 17 00:00:00 2001 From: "Aaron J. Seigo" Date: Wed, 21 Jan 2009 18:23:10 +0000 Subject: [PATCH] actually need to update queueCount otherwise we just go until we run out of sources and an assert due to dequeuing an empty stack. whoops. svn path=/trunk/KDE/kdelibs/; revision=914768 --- dataengine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dataengine.cpp b/dataengine.cpp index e37943e89..1691a7e8c 100644 --- a/dataengine.cpp +++ b/dataengine.cpp @@ -636,9 +636,10 @@ DataContainer *DataEnginePrivate::requestSource(const QString &sourceName, bool void DataEnginePrivate::trimQueue() { uint queueCount = sourceQueue.count(); - while (queueCount >= limit) { + while (queueCount >= limit && !sourceQueue.isEmpty()) { DataContainer *punted = sourceQueue.dequeue(); q->removeSource(punted->objectName()); + queueCount = sourceQueue.count(); } }