Don't blow up if an ast_channel doesn't get allocated.
authorRussell Bryant <russell@russellbryant.com>
Tue, 15 Jun 2010 22:48:12 +0000 (22:48 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 15 Jun 2010 22:48:12 +0000 (22:48 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270726 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/sig_analog.c

index 53804a6..36c551e 100644 (file)
@@ -410,7 +410,9 @@ static struct ast_channel * analog_new_ast_channel(struct analog_pvt *p, int sta
        }
 
        c = p->calls->new_ast_channel(p->chan_pvt, state, startpbx, sub, requestor);
-       ast_string_field_set(c, call_forward, p->call_forward);
+       if (c) {
+               ast_string_field_set(c, call_forward, p->call_forward);
+       }
        p->subs[sub].owner = c;
        if (!p->owner) {
                p->owner = c;