mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-19 16:31:21 +00:00
prevent an invalid active column index if columns have been deleted
svn path=/trunk/KDE/kdebase/apps/; revision=716384
This commit is contained in:
parent
7446edabe4
commit
4616d291ca
|
@ -536,6 +536,12 @@ void DolphinColumnView::showColumn(const KUrl& url)
|
||||||
(*it)->deleteLater();
|
(*it)->deleteLater();
|
||||||
}
|
}
|
||||||
m_columns.erase(start, end);
|
m_columns.erase(start, end);
|
||||||
|
|
||||||
|
const int maxIndex = m_columns.count() - 1;
|
||||||
|
Q_ASSERT(maxIndex >= 0);
|
||||||
|
if (m_index > maxIndex) {
|
||||||
|
m_index = maxIndex;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue