From d84c81a85dc012329441f7ea8a93339dac59042e Mon Sep 17 00:00:00 2001 From: elsid Date: Sun, 17 Aug 2025 12:44:13 +0200 Subject: [PATCH] Check if reload cells aborted before cv wait If mAbortReloadCells is set to true before the first mReloadCellsMutex lock the loop can become infinite. Unlikely to happen in practice but theoretically possible. --- apps/launcher/datafilespage.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/launcher/datafilespage.cpp b/apps/launcher/datafilespage.cpp index 6986b69030..7bd9c9bd65 100644 --- a/apps/launcher/datafilespage.cpp +++ b/apps/launcher/datafilespage.cpp @@ -1041,6 +1041,9 @@ void Launcher::DataFilesPage::reloadCells() while (true) { + if (mAbortReloadCells) + return; + mStartReloadCells.wait(lock); if (mAbortReloadCells) @@ -1071,9 +1074,6 @@ void Launcher::DataFilesPage::reloadCells() } lock.lock(); - - if (mAbortReloadCells) - return; } }