aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-15 22:48:12 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2010-06-15 22:48:12 +0000
commit9af210abd9ca913803348b118f6df7891544acea (patch)
tree3fbefa55db7ab347fe6aa0bcce193f78109cfbe3 /channels
parentdfffed0b121a9dc275ac2d896bc95e94082ddd8b (diff)
Don't blow up if an ast_channel doesn't get allocated.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@270726 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/sig_analog.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/sig_analog.c b/channels/sig_analog.c
index 53804a6f4..36c551e43 100644
--- a/channels/sig_analog.c
+++ b/channels/sig_analog.c
@@ -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;