From 946a4b5c831c05dff6da3d984550832086458892 Mon Sep 17 00:00:00 2001 From: xirvik Date: Mon, 10 Aug 2026 02:41:08 +0000 Subject: [PATCH] Check the focus iterator before dereferencing it on erase. Erasing a download read past the end of the view. --- src/ui/download_list.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/download_list.cc b/src/ui/download_list.cc index 1ab1eab7..c9aca0ff 100644 --- a/src/ui/download_list.cc +++ b/src/ui/download_list.cc @@ -89,7 +89,7 @@ DownloadList::unfocus_download(core::Download* d) { if (m_state == DISPLAY_DOWNLOAD && d == static_cast(m_uiArray[DISPLAY_DOWNLOAD])->download()) activate_display(DISPLAY_DOWNLOAD_LIST); - if (*current_view()->focus() == d && current_view()->focus() < current_view()->end_visible()) + if (current_view()->focus() < current_view()->end_visible() && *current_view()->focus() == d) current_view()->next_focus(); }