From 060131d66a4278c33b40d3e52b33f58eae6e4f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Mon, 21 Aug 2023 22:43:59 +0200 Subject: [PATCH] Don't reload anything if the model is not loaded --- YACReaderLibrary/db/folder_model.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/YACReaderLibrary/db/folder_model.cpp b/YACReaderLibrary/db/folder_model.cpp index 1131a1c4..801b9899 100644 --- a/YACReaderLibrary/db/folder_model.cpp +++ b/YACReaderLibrary/db/folder_model.cpp @@ -108,6 +108,9 @@ QHash FolderModel::roleNames() const void FolderModel::reload() { + if (rootItem == nullptr) + return; + if (!isSubfolder) { auto newModelData = createModelData(_databasePath);