Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
const auto folderRelativePath = _localPath.mid(folder->cleanPath().length() + 1);
SyncJournalFileRecord record;
- folder->journalDb()->getFileRecord(folderRelativePath, &record);
+
+ if (!folder->journalDb()->getFileRecord(folderRelativePath, &record) || !record.isValid()) {
+ qCWarning(lcFileActivityListModel) << "Invalid file record for path:" << _localPath << "will not load activity list model.";
+ return;
+ }
_objectId = record.numericFileId().toInt();
slotRefreshActivity();