]> git.sesse.net Git - vlc/commitdiff
fix for libvlc_get_input_thread: check for null before locking. fixes #1522
authorFilippo Carone <littlejohn@videolan.org>
Sun, 16 Mar 2008 18:59:47 +0000 (19:59 +0100)
committerFilippo Carone <littlejohn@videolan.org>
Sun, 16 Mar 2008 18:59:47 +0000 (19:59 +0100)
bindings/java/core/src/test/java/org/videolan/jvlc/internal/MediaListPlayerTest.java
src/control/media_instance.c

index a60efbe075e23f1855225be063e7b706fa73aba1..52349f798631c0f57437481e5eed847ada1a3577 100644 (file)
@@ -92,10 +92,7 @@ public class MediaListPlayerTest
         Assert.assertEquals(0, exception.raised);
     }
     
-//    @Test
-    /**
-     * see Ticket #1522 on trac ( http://trac.videolan.org/vlc/ticket/1522 ) 
-     */
+    @Test
     public void mediaListPlayerIsPlayingTest()
     {
         libvlc_exception_t exception = new libvlc_exception_t();
index 4b8471b3698554513f3bd310a64e2b94468407ab..e7dc33d3aa09b231b8df190713f4124daa266684 100644 (file)
@@ -124,6 +124,11 @@ input_thread_t *libvlc_get_input_thread( libvlc_media_instance_t *p_mi,
 {
     input_thread_t *p_input_thread;
 
+    if ( !p_mi )
+    {
+        RAISENULL( "Input is NULL" );
+    }
+
     vlc_mutex_lock( &p_mi->object_lock );
 
     if( !p_mi || p_mi->i_input_id == -1 )