Fixes a segfault caused by referencing null frames introduced in r338623
authorJonathan Rose <jrose@digium.com>
Mon, 24 Oct 2011 22:09:11 +0000 (22:09 +0000)
committerJonathan Rose <jrose@digium.com>
Mon, 24 Oct 2011 22:09:11 +0000 (22:09 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342148 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/features.c

index af4e5f4..43dec79 100644 (file)
@@ -4053,11 +4053,11 @@ int ast_bridge_call(struct ast_channel *chan, struct ast_channel *peer, struct a
                                           digits to come in for features. */
                                        ast_debug(1, "Timed out for feature!\n");
                                        if (!ast_strlen_zero(peer_featurecode)) {
-                                               ast_dtmf_stream(chan, peer, peer_featurecode, 0, f->len);
+                                               ast_dtmf_stream(chan, peer, peer_featurecode, 0, f ? f->len : 0);
                                                memset(peer_featurecode, 0, sizeof(peer_featurecode));
                                        }
                                        if (!ast_strlen_zero(chan_featurecode)) {
-                                               ast_dtmf_stream(peer, chan, chan_featurecode, 0, f->len);
+                                               ast_dtmf_stream(peer, chan, chan_featurecode, 0, f ? f->len : 0);
                                                memset(chan_featurecode, 0, sizeof(chan_featurecode));
                                        }
                                        if (f)