From 186bbd7fc3af6e28f5e58df3d24a041f08b3375f Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 13 Jan 2013 13:01:24 +0200 Subject: [PATCH] Safer check --- src/properties/peerlistwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/properties/peerlistwidget.cpp b/src/properties/peerlistwidget.cpp index 290cbd993..6becc9774 100644 --- a/src/properties/peerlistwidget.cpp +++ b/src/properties/peerlistwidget.cpp @@ -317,7 +317,7 @@ void PeerListWidget::loadPeers(const QTorrentHandle &h, bool force_hostname_reso for ( ; itr != itrend; ++itr) { peer_info peer = *itr; std::string ip_str = peer.ip.address().to_string(ec); - if (ec) + if (ec || ip_str.empty()) continue; QString peer_ip = misc::toQString(ip_str); if (m_peerItems.contains(peer_ip)) {