Merged revisions 164977 via svnmerge from
[asterisk/asterisk.git] / channels / chan_sip.c
index 73fece9..a216316 100644 (file)
@@ -10443,7 +10443,9 @@ static int transmit_register(struct sip_registry *r, int sipmethod, const char *
 
        /* exit if we are already in process with this registrar ?*/
        if (r == NULL || ((auth == NULL) && (r->regstate == REG_STATE_REGSENT || r->regstate == REG_STATE_AUTHSENT))) {
-               ast_log(LOG_NOTICE, "Strange, trying to register %s@%s when registration already pending\n", r->username, r->hostname);
+               if (r) {
+                       ast_log(LOG_NOTICE, "Strange, trying to register %s@%s when registration already pending\n", r->username, r->hostname);
+               }
                return 0;
        }