From c25476b5687402312533d40f546775bd2919de8a Mon Sep 17 00:00:00 2001 From: Mathieu Rene Date: Tue, 12 Oct 2010 14:23:55 -0400 Subject: [PATCH] fs_encode: check for file.file_interface before closing --- src/fs_encode.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/fs_encode.c b/src/fs_encode.c index 03468e804d..0f5b034a6e 100644 --- a/src/fs_encode.c +++ b/src/fs_encode.c @@ -195,8 +195,14 @@ int main(int argc, char *argv[]) r = 0; end: - switch_core_file_close(&fh_input); - switch_core_file_close(&fh_output); + + if (fh_input.file_interface) { + switch_core_file_close(&fh_input); + } + + if (fh_output.file_interface) { + switch_core_file_close(&fh_output); + } if (pool) { switch_core_destroy_memory_pool(&pool);