From 4c829292b7b50a1acad55fc00fe4252d29c405af Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 12 Nov 2008 19:45:21 +0000 Subject: [PATCH] umm ya git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10365 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_core_media_bug.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/switch_core_media_bug.c b/src/switch_core_media_bug.c index c6fc06cd5c..a939de9bb3 100644 --- a/src/switch_core_media_bug.c +++ b/src/switch_core_media_bug.c @@ -78,8 +78,13 @@ SWITCH_DECLARE(void *) switch_core_media_bug_get_user_data(switch_media_bug_t *b SWITCH_DECLARE(void) switch_core_media_bug_flush(switch_media_bug_t *bug) { - switch_buffer_zero(bug->raw_read_buffer); - switch_buffer_zero(bug->raw_write_buffer); + if (bug->raw_read_buffer) { + switch_buffer_zero(bug->raw_read_buffer); + } + + if (bug->raw_write_buffer) { + switch_buffer_zero(bug->raw_write_buffer); + } } SWITCH_DECLARE(switch_status_t) switch_core_media_bug_read(switch_media_bug_t *bug, switch_frame_t *frame)