Commit d7bd13a8 authored by Joris Guisson's avatar Joris Guisson
Browse files

Fix crash when duplicate trackers are added

BUG: 274413
parent 885c3169
......@@ -13,6 +13,9 @@ Changes in 4.2:
- Revamp scanfolder plugin (263813, 271657)
- Revamp GUI of mediaplayer plugin
Changes in 4.1.2:
- Fix crash when duplicate trackers are added (274413)
Changes in 4.1.1:
- Make sure that libktorrent translation catalog is inserted (269515)
- Fix wrong tooltip in QM preference page
......
......@@ -157,6 +157,9 @@ namespace kt
void TrackerModel::addTrackers(QList<bt::TrackerInterface*> & tracker_list)
{
if (tracker_list.isEmpty())
return;
int row = trackers.count();
foreach (bt::TrackerInterface* trk,tracker_list)
trackers.append(new Item(trk));
......
......@@ -134,7 +134,8 @@ namespace kt
else if (dupes.size() > 1)
KMessageBox::informationList(0,i18n("The following duplicate trackers were not added:"),dupes.toStringList());
model->addTrackers(tl);
if (!tl.isEmpty())
model->addTrackers(tl);
}
void TrackerView::removeClicked()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment