From 848489c3863b1b7ddbe542aa3e746063722b9280 Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Thu, 31 Jul 2008 22:59:23 +0200 Subject: [PATCH] threads: Make sure we don't re-create a thread if the object has already one. --- src/misc/threads.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/misc/threads.c b/src/misc/threads.c index 266584e17e..9cac384deb 100644 --- a/src/misc/threads.c +++ b/src/misc/threads.c @@ -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); -- 2.39.2