diff options
-rw-r--r-- | channels/chan_zap.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index 3ceec72ab..3a8301c5e 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -5402,6 +5402,15 @@ static void *ss_thread(void *data) int res; int index; + /* in the bizarre case where the channel has become a zombie before we + even get started here, abort safely + */ + if (!p) { + ast_log(LOG_WARNING, "Channel became a zombie before simple switch could be started (%s)\n", chan->name); + ast_hangup(chan); + return NULL; + } + if (option_verbose > 2) ast_verbose( VERBOSE_PREFIX_3 "Starting simple switch on '%s'\n", chan->name); index = zt_get_index(chan, p, 1); |