* fixed 2 segfaults when switching categories within the preferences. The options...
authorFelix Paul Kühne <fkuehne@videolan.org>
Sun, 16 Dec 2007 16:54:03 +0000 (16:54 +0000)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sun, 16 Dec 2007 16:54:03 +0000 (16:54 +0000)
modules/gui/macosx/prefs.m
modules/gui/macosx/prefs_widgets.m

index cf2d666..0b21f13 100644 (file)
@@ -632,7 +632,7 @@ static VLCTreeItem *o_root_item = nil;
             do
             {
                 p_item++;
-                if( !p_item )
+                if( !p_item || !p_item->i_type )
                 {
                     msg_Err( p_intf, "invalid preference item found" );
                     break;
index d23d370..062845e 100644 (file)
     if( self != nil )
     {
         p_item = _p_item;
-        psz_name = strdup( p_item->psz_name );
+        psz_name = p_item->psz_name;
         o_label = NULL;
         i_type = p_item->i_type;
         i_view_type = 0;