Issue #7103 take two. Thanks Mikael!
authorOlle Johansson <oej@edvina.net>
Thu, 1 Jun 2006 16:58:06 +0000 (16:58 +0000)
committerOlle Johansson <oej@edvina.net>
Thu, 1 Jun 2006 16:58:06 +0000 (16:58 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31414 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 93bd72d..9f915fa 100644 (file)
@@ -1366,7 +1366,7 @@ static unsigned int parse_sip_options(struct sip_pvt *pvt, const char *supported
        unsigned int profile = 0;
        int i, found;
 
-       if (!pvt || ast_strlen_zero(supported) )
+       if (ast_strlen_zero(supported) )
                return 0;
 
        if (option_debug > 2 && sipdebug)
@@ -1392,7 +1392,8 @@ static unsigned int parse_sip_options(struct sip_pvt *pvt, const char *supported
                        ast_log(LOG_DEBUG, "Found no match for SIP option: %s (Please file bug report!)\n", next);
        }
 
-       pvt->sipoptions = profile;
+       if (pvt)
+               pvt->sipoptions = profile;
        return profile;
 }