mirror of https://github.com/KDE/kasts.git
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:
parent
20730ccc6f
commit
718a9ef734
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue