Selaa lähdekoodia

Merge branch 'upstream-kwsys' into update-KWSys

Brad King 13 vuotta sitten
vanhempi
sitoutus
1acc689665
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      Source/kwsys/SystemInformation.cxx

+ 1 - 1
Source/kwsys/SystemInformation.cxx

@@ -1323,7 +1323,7 @@ int SystemInformationImplementation::GetFullyQualifiedDomainName(
 
   for (ifa=ifas; ifa!=NULL; ifa=ifa->ifa_next)
     {
-    int fam=ifa->ifa_addr->sa_family;
+    int fam = ifa->ifa_addr? ifa->ifa_addr->sa_family : -1;
     if ((fam==AF_INET) || (fam==AF_INET6))
       {
       char host[NI_MAXHOST]={'\0'};