From d16232dcc75f6d3fc41e9d431612012bc2ff7046 Mon Sep 17 00:00:00 2001 From: luisangelsm Date: Sat, 13 Dec 2025 11:06:01 +0100 Subject: [PATCH] Prevent crash when opening the folders context menu if a folder is not selected --- YACReaderLibrary/library_window.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/YACReaderLibrary/library_window.cpp b/YACReaderLibrary/library_window.cpp index ea6e46c9..52cfdf9a 100644 --- a/YACReaderLibrary/library_window.cpp +++ b/YACReaderLibrary/library_window.cpp @@ -2594,6 +2594,9 @@ void LibraryWindow::showFoldersContextMenu(const QPoint &point) { QModelIndex sourceMI = foldersModelProxy->mapToSource(foldersView->indexAt(point)); + if (!sourceMI.isValid()) + return; + auto folder = foldersModel->getFolder(sourceMI); actions.setFolderAsNormalAction->setCheckable(true);