mirror of
https://github.com/YACReader/yacreader
synced 2025-06-04 01:28:55 -04:00
Fix infinite loop when propagateFolderUpdatesToParent is invoked using the root folder
This commit is contained in:
parent
68b3d75c92
commit
60e2255886
@ -731,7 +731,7 @@ void DBHelper::propagateFolderUpdatesToParent(const Folder &folder, QSqlDatabase
|
||||
{
|
||||
auto currentParentId = folder.parentId;
|
||||
auto currentId = folder.id;
|
||||
while (currentParentId != 1) {
|
||||
while (currentParentId != 1 && currentParentId != 0) { // currentParentId is 0 if `folder` is the root folder
|
||||
auto f = loadFolder(currentParentId, db);
|
||||
currentParentId = f.parentId;
|
||||
currentId = f.id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user