Delete feed pointer as last action

This to ensure that there will not be a dangling pointer when doing all
the other delete operations (entries, enclosures, files and images).
This commit is contained in:
Bart De Vries 2021-04-09 22:52:20 +02:00
parent 20730ccc6f
commit 718a9ef734
1 changed files with 1 additions and 1 deletions

View File

@ -199,9 +199,9 @@ void DataManager::removeFeed(const int &index)
qDebug() << "Remove feed image" << feed->image() << "for feed" << feedurl;
if (!feed->image().isEmpty()) Fetcher::instance().removeImage(feed->image());
delete feed; // remove the pointer
m_feeds.remove(m_feedmap[index]); // remove from m_feeds
m_feedmap.removeAt(index); // remove from m_feedmap
delete feed; // remove the pointer
// Then delete everything from the database
qDebug() << "delete database part of" << feedurl;