]> git.sesse.net Git - vlc/commitdiff
macosx/playlist: added missing sanity check
authorFelix Paul Kühne <fkuehne@videolan.org>
Wed, 22 Aug 2012 14:16:46 +0000 (16:16 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Wed, 22 Aug 2012 14:17:09 +0000 (16:17 +0200)
modules/gui/macosx/playlist.m

index 9f42b17590a3ce63ed4333a0dc854190617f0673..60ca1b8c91034780d4f7061877634a7fae1683cb 100644 (file)
     if( [o_outline_view selectedRow] > -1 )
     {
         p_item = [[o_outline_view itemAtRow: [o_outline_view selectedRow]] pointerValue];
+        if (!p_item)
+            return;
     }
     else
-    /*If no item is selected, sort the whole playlist*/
-    {
-        p_item = [self currentPlaylistRoot];
-    }
+        p_item = [self currentPlaylistRoot]; // If no item is selected, sort the whole playlist
 
     PL_LOCK;
     if( p_item->i_children > -1 ) // the item is a node