diff options
-rw-r--r-- | src/network/kernel/qnetworkinterface_unix.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/kernel/qnetworkinterface_unix.cpp b/src/network/kernel/qnetworkinterface_unix.cpp index 5e6d24dd44..b734476dc2 100644 --- a/src/network/kernel/qnetworkinterface_unix.cpp +++ b/src/network/kernel/qnetworkinterface_unix.cpp @@ -343,7 +343,7 @@ static QList<QNetworkInterfacePrivate *> createInterfaces(ifaddrs *rawList) // - virtual interfaces with no HW address have no AF_PACKET // - interface labels have no AF_PACKET, but shouldn't be shown as a new interface for (ifaddrs *ptr = rawList; ptr; ptr = ptr->ifa_next) { - if (ptr->ifa_addr && ptr->ifa_addr->sa_family != AF_PACKET) { + if (!ptr->ifa_addr || ptr->ifa_addr->sa_family != AF_PACKET) { QString name = QString::fromLatin1(ptr->ifa_name); if (seenInterfaces.contains(name)) continue; |