]> git.sesse.net Git - vlc/blobdiff - modules/gui/ncurses.c
Allow setting the name of an object at any time...
[vlc] / modules / gui / ncurses.c
index b05f93d10faf3d151401a4aa858f62f0fa087b24..1d67a0f73d0e0d27f8a891d0ffd8df0f6fb21a3a 100644 (file)
@@ -1453,10 +1453,13 @@ static void MainBoxWrite( intf_thread_t *p_intf, int l, int x, const char *p_fmt
 
 static void DumpObject( intf_thread_t *p_intf, int *l, vlc_object_t *p_obj, int i_level )
 {
-    const char *psz_name = vlc_object_get_name( p_obj );
+    char *psz_name = vlc_object_get_name( p_obj );
     if( psz_name )
+    {
         MainBoxWrite( p_intf, (*l)++, 1 + 2 * i_level, "%s \"%s\" (%p)",
                 p_obj->psz_object_type, psz_name, p_obj );
+        free( psz_name );
+    }
     else
         MainBoxWrite( p_intf, (*l)++, 1 + 2 * i_level, "%s (%o)",
                 p_obj->psz_object_type, p_obj );