]> git.sesse.net Git - vlc/commitdiff
libvlc: Fix a typo in vlc_gc_object vlc_release(). We need to desstroy when the refco...
authorPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 19 Sep 2008 23:08:38 +0000 (01:08 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 19 Sep 2008 23:12:01 +0000 (01:12 +0200)
(Why do we use uint? We can't track over-releasing?)
(Or we need to init it at 2).

src/libvlc.c

index 07e25d3b3013f21b9e3568833143a57cc04934e1..b6d1e129a481c73e3c881462aa8fffbe96d25fc8 100644 (file)
@@ -185,8 +185,8 @@ void vlc_release (gc_object_t *p_gc)
     vlc_spin_unlock (&p_gc->spin);
 #endif
 
-    assert (refs > 0);
-    if (refs == 1)
+    /* assert(refs >= 0); */
+    if (refs == 0)
     {
         vlc_spin_destroy (&p_gc->spin);
         p_gc->pf_destructor (p_gc);