diff --git a/srtcore/common.cpp b/srtcore/common.cpp index 6a18afcce..9b950c4f6 100644 --- a/srtcore/common.cpp +++ b/srtcore/common.cpp @@ -502,7 +502,8 @@ vector GetLocalInterfaces() while (pUnicast) { LocalInterface a; - a.addr = pUnicast->Address.lpSockaddr; + if (pUnicast->Address.lpSockaddr) + a.addr = pUnicast->Address.lpSockaddr; if (a.addr.len > 0) { // DO NOT collect addresses that are not of @@ -527,7 +528,8 @@ vector GetLocalInterfaces() for (pif = pifa; pif; pif = pif->ifa_next) { LocalInterface i; - i.addr = pif->ifa_addr; + if (pif->ifa_addr) + i.addr = pif->ifa_addr; if (i.addr.len > 0) { // DO NOT collect addresses that are not of