[vlc-devel] commit: messages: Make sure banks is never == 0 before --; (Pierre d' Herbemont )

git version control git at videolan.org
Tue Jun 9 06:24:59 CEST 2009


vlc | branch: master | Pierre d'Herbemont <pdherbemont at free.fr> | Fri Jun  5 19:41:47 2009 -0700| [a2b1a6f8e0554eb7e593a7b41da82c206b8c40c5] | committer: Pierre d'Herbemont 

messages: Make sure banks is never == 0 before --;

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

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

diff --git a/src/misc/messages.c b/src/misc/messages.c
index a453bcc..c42dee0 100644
--- a/src/misc/messages.c
+++ b/src/misc/messages.c
@@ -172,6 +172,7 @@ void msg_Destroy (libvlc_int_t *p_libvlc)
         msg_Err( p_libvlc, "stale interface subscribers (VLC might crash)" );
 
     vlc_mutex_lock( &msg_stack_lock );
+    assert(banks > 0);
     if( --banks == 0 )
         vlc_threadvar_delete( &msg_context );
     vlc_mutex_unlock( &msg_stack_lock );




More information about the vlc-devel mailing list