]> git.sesse.net Git - vlc/commitdiff
libvlc: Don't wait if p_libvlc is dying in libvlc_wait().
authorPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 30 May 2008 15:54:39 +0000 (17:54 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Fri, 30 May 2008 15:54:39 +0000 (17:54 +0200)
src/control/core.c

index d8232d11a4be258ecde0e853f52903b595d4cb5e..d7b220c2235d22de9c0730573e0dc0751f66a1f1 100644 (file)
@@ -177,7 +177,8 @@ void libvlc_wait( libvlc_instance_t *p_i )
 {
     libvlc_int_t *p_libvlc = p_i->p_libvlc_int;
     vlc_object_lock( p_libvlc );
-    while( !vlc_object_wait( p_libvlc ) );
+    if( vlc_object_alive( p_libvlc ) )
+        while( !vlc_object_wait( p_libvlc ) );
     vlc_object_unlock( p_libvlc );
 }