Fixes a segfault caused by referencing null frames introduced in r338623
[asterisk/asterisk.git] / 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)