Avoid segfault
authorChristophe Mutricy <xtophe@videolan.org>
Sun, 5 Oct 2008 16:03:37 +0000 (17:03 +0100)
committerChristophe Mutricy <xtophe@videolan.org>
Sun, 5 Oct 2008 22:20:58 +0000 (23:20 +0100)
Fix #2159

modules/access/mms/mmsh.c

index 5f1f3c2..87bb09b 100644 (file)
@@ -187,6 +187,9 @@ int MMSHOpen( access_t *p_access )
 
         input_thread_t * p_input = vlc_object_find( p_access, VLC_OBJECT_INPUT, FIND_PARENT );
         input_item_t * p_new_loc;
+
+        if( !p_input )
+            return VLC_EGENERIC;
         /** \bug we do not autodelete here */
         p_new_loc = input_item_New( p_access, psz_location, psz_location );
         input_item_AddSubItem( input_GetItem( p_input ), p_new_loc );