]> git.sesse.net Git - vlc/commitdiff
threads: Make sure we don't re-create a thread if the object has already one.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Thu, 31 Jul 2008 20:59:23 +0000 (22:59 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Thu, 31 Jul 2008 20:59:23 +0000 (22:59 +0200)
src/misc/threads.c

index 266584e17e4a8719e80909f492f0527c3265600d..9cac384deb65caebc5a68ef1508e18699abf5e15 100644 (file)
@@ -501,6 +501,9 @@ int __vlc_thread_create( vlc_object_t *p_this, const char * psz_file, int i_line
 
     vlc_object_lock( p_this );
 
+    /* Make sure we don't re-create a thread if the object has already one */
+    assert( !p_priv->b_thread );
+
 #if defined( LIBVLC_USE_PTHREAD )
     pthread_attr_t attr;
     pthread_attr_init (&attr);