Commit c8939409 authored by Peter Penz's avatar Peter Penz
Browse files

Fixed triggering of an assertion if the parent directory of the model has been...

Fixed triggering of an assertion if the parent directory of the model has been deleted from outside (reviewed by David Faure). This fixes a crash in Dolphin and Konqueror if the currently shown directory gets deleted from outside.

CCMAIL: faure@kde.org
CCMAIL: riccardo@kde.org

svn path=/trunk/KDE/kdelibs/; revision=729674
parent 66cd1c8c
......@@ -355,7 +355,8 @@ void KDirModelPrivate::_k_slotDeleteItem(const KFileItem& item)
return;
KDirModelDirNode* dirNode = node->parent();
Q_ASSERT(dirNode);
if (!dirNode)
return;
QModelIndex parentIndex = indexForNode(dirNode); // O(n)
q->beginRemoveRows( parentIndex, rowNumber, rowNumber );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment