FS-9714: [core] switch assert on attempted double close of a file handle

This commit is contained in:
Mike Jerris 2016-11-08 13:22:35 -06:00
parent 113a902e26
commit e332c1a24c
1 changed files with 1 additions and 2 deletions

View File

@ -780,9 +780,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_close(switch_file_handle_t *fh)
switch_status_t status;
switch_assert(fh != NULL);
switch_assert(fh->file_interface != NULL);
if (!switch_test_flag(fh, SWITCH_FILE_OPEN)) {
if (!fh->file_interface || !switch_test_flag(fh, SWITCH_FILE_OPEN)) {
return SWITCH_STATUS_FALSE;
}