diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/LAN_discovery.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/LAN_discovery.c b/core/LAN_discovery.c index 55953685..26b3930c 100644 --- a/core/LAN_discovery.c +++ b/core/LAN_discovery.c | |||
@@ -70,6 +70,10 @@ static uint32_t get_broadcast(void) | |||
70 | } | 70 | } |
71 | } | 71 | } |
72 | close(sock); | 72 | close(sock); |
73 | if(sock_holder == NULL) { | ||
74 | perror("[!] no broadcast device found"); | ||
75 | return 0; | ||
76 | } | ||
73 | 77 | ||
74 | return sock_holder->sin_addr.s_addr; | 78 | return sock_holder->sin_addr.s_addr; |
75 | } | 79 | } |