From b7ef0665451c2e87bbef1acf5312b00a6e320432 Mon Sep 17 00:00:00 2001 From: ngosang Date: Fri, 22 Apr 2016 23:47:22 +0200 Subject: [PATCH] Fix Add tracker dialog empty trackers --- src/gui/properties/trackersadditiondlg.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gui/properties/trackersadditiondlg.cpp b/src/gui/properties/trackersadditiondlg.cpp index a5d2928d0..466ebb6f6 100644 --- a/src/gui/properties/trackersadditiondlg.cpp +++ b/src/gui/properties/trackersadditiondlg.cpp @@ -53,7 +53,13 @@ TrackersAdditionDlg::TrackersAdditionDlg(BitTorrent::TorrentHandle *const torren QStringList TrackersAdditionDlg::newTrackers() const { - return trackers_list->toPlainText().trimmed().split("\n"); + QStringList cleanTrackers; + foreach (QString url, trackers_list->toPlainText().split("\n")) { + url = url.trimmed(); + if (!url.isEmpty()) + cleanTrackers << url; + } + return cleanTrackers; } void TrackersAdditionDlg::on_uTorrentListButton_clicked()