aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_iax2.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_iax2.c')
-rw-r--r--channels/chan_iax2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 6eae6823c..b52c1acd4 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -2631,7 +2631,7 @@ static struct iax2_peer *realtime_peer(const char *peername, struct sockaddr_in
var = ast_load_realtime("iaxpeers", "name", peername, "host", "dynamic", NULL);
if (!var)
var = ast_load_realtime("iaxpeers", "name", peername, "host", ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr));
- } else {
+ } else if (sin) {
char porta[25];
ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr);
sprintf(porta, "%d", ntohs(sin->sin_port));