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

This commit is contained in:
Mike Jerris committed 2016-11-16 11:23:12 -06:00
1 parent cb382084f0
commit 08aa721cda
1 file changed
+1 -2
+1 -2
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;
}