summaryrefslogtreecommitdiff
path: root/cvorbis.c
diff options
context:
space:
mode:
Diffstat (limited to 'cvorbis.c')
-rw-r--r--cvorbis.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/cvorbis.c b/cvorbis.c
index 7ce772e1..e5965d38 100644
--- a/cvorbis.c
+++ b/cvorbis.c
@@ -32,9 +32,12 @@ int cvorbis_init (const char *fname) {
void
cvorbis_free (void) {
- fclose (file);
- ov_clear (&vorbis_file);
- vi = NULL;
+ if (file) {
+ ov_clear (&vorbis_file);
+ //fclose (file); -- ov_clear closes it
+ file = NULL;
+ vi = NULL;
+ }
}
int