diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index c9ca7d85deed4cabdc9e0da4721f0066b27555d5..abf535782ab265653f55b308c1dd6e687b815664 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -30275,6 +30275,12 @@ static int setup_srtp(struct sip_srtp **srtp)
 
 static int process_crypto(struct sip_pvt *p, struct ast_rtp_instance *rtp, struct sip_srtp **srtp, const char *a)
 {
+	/* If no RTP instance exists for this media stream don't bother processing the crypto line */
+	if (!rtp) {
+		ast_debug(3, "Received offer with crypto line for media stream that is not enabled\n");
+		return FALSE;
+	}
+
 	if (strncasecmp(a, "crypto:", 7)) {
 		return FALSE;
 	}