From f9569eb19d3dad9693312015436a5419322a3a1b Mon Sep 17 00:00:00 2001 From: =?utf8?q?M=C3=A9ven=20Car?= Date: Thu, 1 May 2025 10:42:48 +0200 Subject: [PATCH] dolphinview: fix crash Correctly find the last element in the list instead of the one after the last Amends: 0464ea82a6850f58805bc4d6fc1df5369d83c3df BUG: 503610 --- src/views/dolphinview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 0afa27d73..933bfda07 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -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; -- 2.47.3