]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/dolphinview.cpp
dolphinview: fix crash
[dolphin.git] / src / views / dolphinview.cpp
index 0afa27d738220f179bd6eb6bbec5da58d5fe0d35..933bfda07fd1ec7c5907ad414c932b7b587ec5e8 100644 (file)
@@ -1883,7 +1883,7 @@ void DolphinView::selectNextItem()
             Q_ASSERT_X(false, "DolphinView", "Selecting the next item failed.");
             return;
         }
-        const auto lastSelectedIndex = m_model->index(*selectedItems().constEnd());
+        const auto lastSelectedIndex = m_model->index(selectedItems().constLast());
         if (lastSelectedIndex < 0) {
             Q_ASSERT_X(false, "DolphinView", "Selecting the next item failed.");
             return;