We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 75eb5d1 commit 7be8e0eCopy full SHA for 7be8e0e
1 file changed
src/SDL_net.c
@@ -713,7 +713,7 @@ static void RefreshInterfaces(void) // LINUX/BSD VERSION
713
NetworkInterface *new_interfaces = NULL;
714
int new_num_interfaces = 0;
715
for (struct ifaddrs *i = ifaddr; i != NULL; i = i->ifa_next) {
716
- if (i->ifa_name != NULL) {
+ if (i->ifa_name && i->ifa_addr) {
717
new_num_interfaces++;
718
}
719
@@ -729,7 +729,7 @@ static void RefreshInterfaces(void) // LINUX/BSD VERSION
729
730
NetworkInterface *iface = &new_interfaces[0];
731
for (struct ifaddrs *i = ifaddr; i != NULL; i = i->ifa_next, iface++) {
732
- if (i->ifa_name == NULL) {
+ if (!i->ifa_name || !i->ifa_addr) {
733
continue; // i guess.
734
735
0 commit comments