mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Fix crasher when updating the comics model
This commit is contained in:
parent
611880aba8
commit
72535ffc98
@ -897,12 +897,12 @@ void ComicModel::takeUpdatedData(const QList<ComicItem *> &updatedData, std::fun
|
||||
i++;
|
||||
}
|
||||
|
||||
// remove remaining comics {
|
||||
for (; i < length; i++) {
|
||||
beginRemoveRows(QModelIndex(), i, i);
|
||||
// remove remaining comics
|
||||
for (int k = length - 1; k >= i; k--) {
|
||||
beginRemoveRows(QModelIndex(), k, k);
|
||||
|
||||
delete _data.at(i);
|
||||
_data.removeAt(i);
|
||||
delete _data.at(k);
|
||||
_data.removeAt(k);
|
||||
|
||||
endRemoveRows();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user