]> git.sesse.net Git - vlc/commitdiff
Use the module's name as object name if none was explicitly given by the user.
authorAntoine Cellerier <dionoea@videolan.org>
Sat, 24 Mar 2007 20:36:57 +0000 (20:36 +0000)
committerAntoine Cellerier <dionoea@videolan.org>
Sat, 24 Mar 2007 20:36:57 +0000 (20:36 +0000)
src/misc/modules.c

index ade1fbc9a9b827ead9816f90ca8119b0529abaac..8238eb983c57b9ede93cad1f14e6b82c1099da80 100644 (file)
@@ -711,11 +711,16 @@ found_shortcut:
     else
         msg_StackSet( VLC_EGENERIC, "no suitable %s module", psz_capability );
 
-    if( psz_alias && !p_this->psz_object_name )
+    if( p_module && !p_this->psz_object_name )
+    {
         /* This assumes that p_this is the object which will be using the
          * module. That's not always the case ... but it is in most cases.
          */
-        p_this->psz_object_name = strdup( psz_alias );
+        if( psz_alias )
+            p_this->psz_object_name = strdup( psz_alias );
+        else
+            p_this->psz_object_name = strdup( p_module->psz_object_name );
+    }
 
     if( psz_shortcuts )
     {