0
0
mirror of https://github.com/keepassxreboot/keepassxc.git synced 2024-09-20 04:12:15 +02:00

Fix crash when deleting history items

* Fixes #10386
This commit is contained in:
Jonathan White 2024-03-16 15:56:56 -04:00
parent 6481ecccd7
commit e657cbf43b

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();
}
}