vttdemux,CloseFiles: check file pointer before closing

BUG=webm:1405

Change-Id: I7729277c632d40d478aa80ca6a009f95038196fb
This commit is contained in:
James Zern 2017-04-17 15:55:17 -07:00
parent c59278c4b4
commit 784fc1bb7c

View File

@ -523,8 +523,10 @@ void vttdemux::CloseFiles(metadata_map_t* metadata_map) {
metadata_map_t::value_type& v = *i++;
MetadataInfo& info = v.second;
fclose(info.file);
info.file = NULL;
if (info.file != NULL) {
fclose(info.file);
info.file = NULL;
}
}
}