don't blow up if a jitterbuffer is not in use
authorRussell Bryant <russell@russellbryant.com>
Thu, 22 Jun 2006 17:49:28 +0000 (17:49 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 22 Jun 2006 17:49:28 +0000 (17:49 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35555 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channel.c

index 30a1ad0..84e2fbe 100644 (file)
--- a/channel.c
+++ b/channel.c
@@ -1015,7 +1015,8 @@ void ast_channel_free(struct ast_channel *chan)
                ast_var_delete(vardata);
 
        /* Destroy the jitterbuffer */
-       ast_jb_destroy(chan);
+       if (chan->jb)
+               ast_jb_destroy(chan);
 
        ast_string_field_free_all(chan);
        free(chan);