diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 36804f15701d5e6af8e1261df4ede37d91722d92..ef0227ce051451c91c1d0254319c57a83d631822 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4763,7 +4763,7 @@ static int sip_hangup(struct ast_channel *ast)
 		sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
 
 	/* Start the process if it's not already started */
-	if (!p->alreadygone && !ast_strlen_zero(p->initreq.data->str)) {
+	if (!p->alreadygone && p->initreq.data && !ast_strlen_zero(p->initreq.data->str)) {
 		if (needcancel) {	/* Outgoing call, not up */
 			if (ast_test_flag(&p->flags[0], SIP_OUTGOING)) {
 				/* stop retransmitting an INVITE that has not received a response */