- if( p_view && index < p_view->p_root->i_children && index >= 0 )
- p_return = p_view->p_root->pp_children[index];
+ if( p_view && p_view->p_root ) p_return = p_view->p_root->pp_children[index];
+
+ if( i_current_view == VIEW_CATEGORY )
+ {
+ if( p_playlist->p_general->i_children && index >= 0 && index < p_playlist->p_general->i_children )
+ {
+ p_return = p_playlist->p_general->pp_children[index];
+ }
+ else if( p_view && p_view->p_root && index >= 0 && index - p_playlist->p_general->i_children < p_view->p_root->i_children )
+ {
+ p_return = p_view->p_root->pp_children[index - p_playlist->p_general->i_children + 1];
+
+ }
+ }