diff options
| author | Méven Car <[email protected]> | 2025-05-01 10:42:48 +0200 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2025-05-02 09:28:48 +0200 |
| commit | f9569eb19d3dad9693312015436a5419322a3a1b (patch) | |
| tree | 3b7c4cad1556f7d2ba20be9c3906f0d1a90f5133 /src | |
| parent | 94969a002e776277456478d3228fec7c74acb511 (diff) | |
dolphinview: fix crash
Correctly find the last element in the list instead of the one after the last
Amends: 0464ea82a6850f58805bc4d6fc1df5369d83c3df
BUG: 503610
Diffstat (limited to 'src')
| -rw-r--r-- | src/views/dolphinview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |
