Commit ca5c3351 authored by Frank Reininghaus's avatar Frank Reininghaus
Browse files

Don't try to divide by zero.

Fixes a crash in Dolphin when pressing a key so quickly after a url
change that there are no items in the file item model yet.

BUG:287147
parent effde5c2
......@@ -240,7 +240,7 @@ bool KItemListController::keyPressEvent(QKeyEvent* event)
void KItemListController::slotChangeCurrentItem(const QString& text, bool searchFromNextItem)
{
if (!m_model) {
if (!m_model || m_model->count() == 0) {
return;
}
const int currentIndex = m_selectionManager->currentItem();
......
Markdown is supported
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