Fix crash when deleting history items

* Fixes #10386
This commit is contained in:
Jonathan White committed 2024-04-20 12:53:39 -04:00
1 parent 6481ecccd7
commit e657cbf43b
1 file changed
+2 -2
+2 -2
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();
}
}