File patch-r890181.diff of Package kdelibs4
Index: kio/kio/kdirmodel.cpp
===================================================================
--- kio/kio/kdirmodel.cpp (revision 890177)
+++ kio/kio/kdirmodel.cpp (revision 890181)
@@ -411,8 +411,10 @@ void KDirModelPrivate::_k_slotDeleteItem
Q_ASSERT(!item.isNull());
KUrl url = item.url();
KDirModelNode* node = nodeForUrl(url); // O(depth)
- if (!node)
+ if (!node) {
+ kWarning(7008) << "No node found for item that was just removed:" << url;
return;
+ }
KDirModelDirNode* dirNode = node->parent();
if (!dirNode)
@@ -439,6 +441,9 @@ void KDirModelPrivate::_k_slotDeleteItem
if (!node) { // don't lookup the first item twice
url = item.url();
node = nodeForUrl(url);
+ if (!node) {
+ kWarning(7008) << "No node found for item that was just removed:" << url;
+ }
Q_ASSERT(node);
}
rowNumbers.setBit(node->rowNumber(), 1); // O(n)