Fix crash when deleting history items

* Fixes #10386
This commit is contained in:
Jonathan White 2024-03-16 15:56:56 -04:00
parent 4b87a3e58e
commit 8723b7f6a4
No known key found for this signature in database
GPG Key ID: 440FC65F2E0C6E01

View File

@ -159,9 +159,9 @@ void EntryHistoryModel::deleteIndex(QModelIndex index)
auto entry = entryFromIndex(index);
if (entry) {
beginRemoveRows(QModelIndex(), index.row(), index.row());
m_historyEntries.removeAll(entry);
m_historyEntries.removeAt(index.row());
m_deletedHistoryEntries << entry;
m_historyModifications.erase(m_historyModifications.begin() + index.row());
calculateHistoryModifications();
endRemoveRows();
}
}