]> git.sesse.net Git - vlc/blobdiff - src/modules/modules.c
Hide psz_object_name in private data
[vlc] / src / modules / modules.c
index f0a015ef04bdc40de10868b114dd99b24ab5abbf..6a0aa47611c9673197a47b753f259c85fcdf2689 100644 (file)
@@ -607,15 +607,13 @@ found_shortcut:
     {
         msg_Dbg( p_this, "using %s module \"%s\"",
                  psz_capability, p_module->psz_object_name );
-        if( !p_this->psz_object_name )
+        if( !vlc_internals(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.
              */
-            if( psz_alias )
-                p_this->psz_object_name = strdup( psz_alias );
-            else
-                p_this->psz_object_name = strdup( p_module->psz_object_name );
+            vlc_internals(p_this)->psz_object_name =
+                strdup( psz_alias ? psz_alias : p_module->psz_object_name );
         }
     }
     else if( count == 0 )