diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 0117197b6ed0b4de743a1b48e8f4a5a5ed0fb232..23eaa695fb7785e71cd1d6ec0c8d2570700bf70b 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -8971,7 +8971,7 @@ static int reqprep(struct sip_request *req, struct sip_pvt *p, int sipmethod, in
 	 * Similarly, if we need to re-send an INVITE with auth credentials, then we
 	 * need to use the same branch as we did the first time we sent the INVITE.
 	 */
-	if (sipmethod == SIP_CANCEL || (sipmethod == SIP_INVITE && !ast_strlen_zero(p->options->auth))) {
+	if (sipmethod == SIP_CANCEL || (sipmethod == SIP_INVITE && p->options && !ast_strlen_zero(p->options->auth))) {
 		p->branch = p->invite_branch;
 		build_via(p);
 	} else if (newbranch) {