Browse Source

- Fixed crash on feed deletion

adaptive-webui-19844
Christophe Dumez 15 years ago
parent
commit
8e5f5b5d65
  1. 4
      src/rss_imp.cpp

4
src/rss_imp.cpp

@ -156,7 +156,7 @@ void RSSImp::on_newFeedButton_clicked() {
} }
RssStream *stream = rss_parent->addStream(newUrl); RssStream *stream = rss_parent->addStream(newUrl);
// Create TreeWidget item // Create TreeWidget item
QTreeWidgetItem* item = new QTreeWidgetItem(rss_parent); QTreeWidgetItem* item = new QTreeWidgetItem(parent_item);
// Notify TreeWidget // Notify TreeWidget
listStreams->itemAdded(item, stream); listStreams->itemAdded(item, stream);
// Set text // Set text
@ -188,10 +188,10 @@ void RSSImp::deleteSelectedItems() {
listNews->clear(); listNews->clear();
} }
RssFile *rss_item = listStreams->getRSSItem(item); RssFile *rss_item = listStreams->getRSSItem(item);
rss_item->getParent()->removeFile(rss_item->getID());
// Notify TreeWidget // Notify TreeWidget
listStreams->itemRemoved(item); listStreams->itemRemoved(item);
// Actually delete the item // Actually delete the item
rss_item->getParent()->removeFile(rss_item->getID());
delete item; delete item;
} }
rssmanager->saveStreamList(); rssmanager->saveStreamList();

Loading…
Cancel
Save