clients/playrtp.c: Don't crash if an interface has a null address.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 4 May 2020 15:25:35 +0000 (16:25 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 4 May 2020 18:57:15 +0000 (19:57 +0100)
Just skip it and move on.

clients/playrtp.c

index 8878e8c..372bfcf 100644 (file)
@@ -809,6 +809,7 @@ int main(int argc, char **argv) {
       disorder_fatal(errno, "error calling getifaddrs");
     /* Try to pick a good one */
     for(; ifa; ifa = ifa->ifa_next) {
+      if(!ifa->ifa_addr) continue;
       if(bestifa == NULL
          || compare_interfaces(ifa, bestifa, family) > 0)
         bestifa = ifa;