summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--channel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channel.c b/channel.c
index 30a1ad073..84e2fbe79 100644
--- 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);