mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-12-16 21:11:50 +03:00
Safer check
This commit is contained in:
parent
34fc7407a2
commit
186bbd7fc3
1 changed files with 1 additions and 1 deletions
|
@ -317,7 +317,7 @@ void PeerListWidget::loadPeers(const QTorrentHandle &h, bool force_hostname_reso
|
||||||
for ( ; itr != itrend; ++itr) {
|
for ( ; itr != itrend; ++itr) {
|
||||||
peer_info peer = *itr;
|
peer_info peer = *itr;
|
||||||
std::string ip_str = peer.ip.address().to_string(ec);
|
std::string ip_str = peer.ip.address().to_string(ec);
|
||||||
if (ec)
|
if (ec || ip_str.empty())
|
||||||
continue;
|
continue;
|
||||||
QString peer_ip = misc::toQString(ip_str);
|
QString peer_ip = misc::toQString(ip_str);
|
||||||
if (m_peerItems.contains(peer_ip)) {
|
if (m_peerItems.contains(peer_ip)) {
|
||||||
|
|
Loading…
Reference in a new issue