]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/playlistinfo.m
* added a button to create an empty node at the top level of the playlist. Thanks...
[vlc] / modules / gui / macosx / playlistinfo.m
index 6b6d61023354d2694c4acc67d9bfa05fe239968b..aa164777a032870ac5c9644b5ec42a31549af163 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  r playlistinfo.m: MacOS X interface module
  *****************************************************************************
- * Copyright (C) 2002-2004 VideoLAN
+ * Copyright (C) 2002-2005 the VideoLAN team
  * $Id$
  *
  * Authors: Benjamin Pracht <bigben at videolan dot org>
@@ -18,7 +18,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
                                           FIND_ANYWHERE );
     vlc_value_t val;
 
-    if ([self isItemInPlaylist: p_item] )
+    if[self isItemInPlaylist: p_item] )
     {
         vlc_mutex_lock( &p_item->input.lock );
 
         val.b_bool = VLC_TRUE;
         var_Set( p_playlist, "intf-change", val );
     }
-
+    vlc_object_release( p_playlist );
     [o_info_window orderOut: self];
 }
 
@@ -260,7 +260,10 @@ static VLCInfoTreeItem *o_root_item = nil;
         o_value = [o_item_value copy];
         i_object_id = i_id;
         o_parent = o_parent_item;
-        p_item = [[[VLCMain sharedInstance] getInfo] getItem];
+        if( [[VLCMain sharedInstance] getInfo] != nil )
+            p_item = [[[VLCMain sharedInstance] getInfo] getItem];
+        else
+            p_item = NULL;
     }
     return( self );
 }