]> git.sesse.net Git - vlc/commitdiff
Fixes playlist search when metadata is missing
authorRafaël Carré <funman@videolan.org>
Sun, 9 Sep 2007 23:05:48 +0000 (23:05 +0000)
committerRafaël Carré <funman@videolan.org>
Sun, 9 Sep 2007 23:05:48 +0000 (23:05 +0000)
include/vlc_input.h

index 2d30b9e30d75f9256cf03defa0b028b857ac94e7..7161219e7ed323c9d2ba9ccd95078dfc9ba27651 100644 (file)
@@ -238,6 +238,11 @@ static inline void input_item_SetMeta( input_item_t *p_i, vlc_meta_type_t meta_t
 static inline vlc_bool_t input_item_MetaMatch( input_item_t *p_i, vlc_meta_type_t meta_type, const char *psz )
 {
     vlc_mutex_lock( &p_i->lock );
+    if( !p_i->p_meta )
+    {
+        vlc_mutex_unlock( &p_i->lock );
+        return VLC_FALSE;
+    }
     const char * meta = vlc_meta_Get( p_i->p_meta, meta_type );
     vlc_bool_t ret = meta && strcasestr( meta, psz );
     vlc_mutex_unlock( &p_i->lock );