diff --git a/channels/chan_sip.c b/channels/chan_sip.c index bdd515677f37cb08f38f6f79d82ce7bd73a436db..5e8317341008e569af3c16415db13a5f305fc7ec 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -12439,7 +12439,7 @@ static int handle_request_refer(struct sip_pvt *p, struct sip_request *req, int return -1; } - if (sipdebug && option_debug > 3) + if (current.chan2 && sipdebug && option_debug > 3) ast_log(LOG_DEBUG, "Got SIP transfer, applying to bridged peer '%s'\n", current.chan2->name); /* Stop music on hold on this channel */