]> git.sesse.net Git - vlc/commitdiff
playlist.m: Fix the so problematic 21193.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 18 Aug 2007 05:16:04 +0000 (05:16 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 18 Aug 2007 05:16:04 +0000 (05:16 +0000)
modules/gui/macosx/playlist.m

index 85cff494182f6cd3e510a4b47de919972fbbc78d..beb3842ab694aa0efa08c8de91d06b496bd31236 100644 (file)
     {
         /* sanity check to prevent the NSString class from crashing */
         char *psz_title =  input_item_GetTitle( p_item->p_input );
-        if( !EMPTY_STR( psz_title ) ) )
+        if( !EMPTY_STR( psz_title ) )
         {
-            o_value = [NSString stringWithUTF8String: psz_title )];
+            o_value = [NSString stringWithUTF8String: psz_title];
             if( o_value == NULL )
-                o_value = [NSString stringWithCString: psz_title )];
+                o_value = [NSString stringWithCString: psz_title];
         } 
         else
         {
                 if( o_value == NULL )
                     o_value = [NSString stringWithCString: psz_name];
             }
+            free( psz_name );
         }
         free( psz_title );
-        free( psz_name );
     }
     else
     {