Commit ea3ed1d9 authored by Frank Reininghaus's avatar Frank Reininghaus

Fix possible crash when refreshing the view while renaming inline

It is not reproducible on every machine for me, but it seems that it can
happen that DolphinView's slot slotRoleEditingFinished() is invoked
after the items have already been removed from the model. In that case,
we have to return from the slot immediately to prevent a crash.

BUG: 306147
FIXED-IN: 4.9.2
parent a502d397
......@@ -1321,6 +1321,10 @@ void DolphinView::slotVisibleRolesChangedByHeader(const QList<QByteArray>& curre
void DolphinView::slotRoleEditingFinished(int index, const QByteArray& role, const QVariant& value)
if (index < 0 || index >= m_model->count()) {
if (role == "text") {
const KFileItem oldItem = m_model->fileItem(index);
const QString newName = value.toString();
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment