From d8ce5b8904f5bec4f02dc2ad172e9bfa7a53464a Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Tue, 2 Dec 2014 12:11:55 +0100 Subject: [PATCH] fix crash when tunnel mode is compiled but disabled --- coreapi/bellesip_sal/sal_op_impl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreapi/bellesip_sal/sal_op_impl.c b/coreapi/bellesip_sal/sal_op_impl.c index 1f734719f..2e68146a0 100644 --- a/coreapi/bellesip_sal/sal_op_impl.c +++ b/coreapi/bellesip_sal/sal_op_impl.c @@ -313,7 +313,7 @@ static int _sal_op_send_request_with_contact(SalOp* op, belle_sip_request_t* req } }else{ #ifdef TUNNEL_ENABLED - if (BELLE_SIP_OBJECT_IS_INSTANCE_OF(udplp,belle_sip_tunnel_listening_point_t)){ + if (udplp && BELLE_SIP_OBJECT_IS_INSTANCE_OF(udplp,belle_sip_tunnel_listening_point_t)){ /* our tunnel mode only supports UDP. Force transport to be set to UDP */ belle_sip_uri_set_transport_param(next_hop_uri,"udp"); }