aboutsummaryrefslogtreecommitdiffstats
path: root/main/acl.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/acl.c')
-rw-r--r--main/acl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/acl.c b/main/acl.c
index 22248648f..9a141a373 100644
--- a/main/acl.c
+++ b/main/acl.c
@@ -144,7 +144,7 @@ static int get_local_address(struct in_addr *ourip)
#if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__linux__) || defined(__Darwin__)
for (ifap = ifaphead; ifap; ifap = ifap->ifa_next) {
- if (ifap->ifa_addr->sa_family == AF_INET) {
+ if (ifap->ifa_addr && ifap->ifa_addr->sa_family == AF_INET) {
sin = (const struct sockaddr_in *) ifap->ifa_addr;
score_address(sin, &best_addr, &best_score);
res = 0;