summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--channels/chan_sip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index e204f0053..e8cc591a3 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -29450,7 +29450,7 @@ static int sip_prepare_socket(struct sip_pvt *p)
return s->fd;
}
if ((s->type & (AST_TRANSPORT_TCP | AST_TRANSPORT_TLS)) &&
- s->tcptls_session) {
+ s->tcptls_session && s->tcptls_session->stream) {
return ast_iostream_get_fd(s->tcptls_session->stream);
}
if ((s->type & (AST_TRANSPORT_WS | AST_TRANSPORT_WSS))) {