control/media_descriptor.c: Make sure not to retain a NULL object.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 25 Aug 2007 01:26:35 +0000 (01:26 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 25 Aug 2007 01:26:35 +0000 (01:26 +0000)
src/control/media_descriptor.c

index 2c49a99..f55f976 100644 (file)
@@ -445,7 +445,7 @@ libvlc_media_list_t *
 libvlc_media_descriptor_subitems( libvlc_media_descriptor_t * p_md,
                                   libvlc_exception_t * p_e )
 {
-    libvlc_media_list_retain( p_md->p_subitems );
+    if( p_md->p_subitems )
+        libvlc_media_list_retain( p_md->p_subitems );
     return p_md->p_subitems;
 }
-