From 17c0becaf161355c19c554fd472cefdfbe1b41eb Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20Paul=20K=C3=BChne?= Date: Wed, 22 Aug 2012 16:16:46 +0200 Subject: [PATCH] macosx/playlist: added missing sanity check --- modules/gui/macosx/playlist.m | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m index 9f42b17590..60ca1b8c91 100644 --- a/modules/gui/macosx/playlist.m +++ b/modules/gui/macosx/playlist.m @@ -1042,12 +1042,11 @@ 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 -- 2.39.2