[vlc-devel] commit: GC: assert pf_destructor ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Sep 21 12:27:26 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sun Sep 21 12:56:23 2008 +0300| [cc2d7b41b499a24ca4c9575f611e9d0b35f38219] | committer: Rémi Denis-Courmont 

GC: assert pf_destructor

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cc2d7b41b499a24ca4c9575f611e9d0b35f38219
---

 src/libvlc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/libvlc.c b/src/libvlc.c
index 4fce0d9..3a7c407 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -126,6 +126,8 @@ static bool b_daemon = false;
  */
 void *vlc_gc_init (gc_object_t *p_gc, void (*pf_destruct) (gc_object_t *))
 {
+    /* There is no point in using the GC if there is destructor... */
+    assert (pf_destruct);
     p_gc->pf_destructor = pf_destruct;
 
     p_gc->refs = 1;




More information about the vlc-devel mailing list