]> git.sesse.net Git - vlc/commitdiff
libvlc: Make sure we don't continue vlc exectution if no modules where found.
authorPierre d'Herbemont <pdherbemont@free.fr>
Wed, 9 Dec 2009 15:47:31 +0000 (16:47 +0100)
committerPierre d'Herbemont <pdherbemont@free.fr>
Thu, 10 Dec 2009 01:02:48 +0000 (02:02 +0100)
This is done to better diagnosticate misconfiguration of libvlc path.

src/libvlc.c

index 04eaaf952c3f044f438c6573e5b34064ae616277..558595e8f006456cad273dcbad96559f4110abc8 100644 (file)
@@ -475,6 +475,12 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     module_list_free( list );
     msg_Dbg( p_libvlc, "module bank initialized (%zu modules)", module_count );
 
+    if( module_count <= 1)
+    {
+        msg_Err( p_libvlc, "No modules were found, refusing to start. Check "
+                           "that you properly gave a module path with --plugin-path.");
+        abort();
+    }
     /* Check for help on modules */
     if( (p_tmp = config_GetPsz( p_libvlc, "module" )) )
     {