this version of tremor requires a nil check on close_func
authorkoda
Sat, 03 Nov 2012 19:16:05 +0100
changeset 7941 1e8b7fc8f90d
parent 7939 f951c4b5b335
child 7943 0b03ac28212d
this version of tremor requires a nil check on close_func https://svn.xiph.org/trunk/Tremor/vorbisfile.c
misc/libtremor/tremor/vorbisfile.c
--- a/misc/libtremor/tremor/vorbisfile.c	Sat Nov 03 18:01:38 2012 +0100
+++ b/misc/libtremor/tremor/vorbisfile.c	Sat Nov 03 19:16:05 2012 +0100
@@ -739,7 +739,8 @@
     if(vf->offsets)_ogg_free(vf->offsets);
     ogg_sync_destroy(vf->oy);
 
-    if(vf->datasource)(vf->callbacks.close_func)(vf->datasource);
+    if(vf->datasource && vf->callbacks.close_func)
+        (vf->callbacks.close_func)(vf->datasource);
     memset(vf,0,sizeof(*vf));
   }
 #ifdef DEBUG_LEAKS