mirror of
https://github.com/YACReader/yacreader
synced 2026-03-03 11:20:15 -05:00
Prevent crash when opening the folders context menu if a folder is not selected
This commit is contained in:
@ -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);
|
||||
|
||||
Reference in New Issue
Block a user