]> git.sesse.net Git - vlc/commitdiff
* don't search the playlist when there is nothing in it. We will crash.
authorDerk-Jan Hartman <hartman@videolan.org>
Mon, 15 Dec 2003 14:25:43 +0000 (14:25 +0000)
committerDerk-Jan Hartman <hartman@videolan.org>
Mon, 15 Dec 2003 14:25:43 +0000 (14:25 +0000)
modules/gui/macosx/playlist.m

index 0801d4f8eee4079ef4e025df55c03936daf9380d..cf2f21e183332e409b539ab5648ae0bc8e5fb079 100644 (file)
@@ -2,7 +2,7 @@
  * playlist.m: MacOS X interface plugin
  *****************************************************************************
  * Copyright (C) 2002-2003 VideoLAN
- * $Id: playlist.m,v 1.48 2003/12/11 19:34:46 hartman Exp $
+ * $Id: playlist.m,v 1.49 2003/12/15 14:25:43 hartman Exp $
  *
  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
  *          Derk-Jan Hartman <thedj@users.sourceforge.net>
     {
         return;
     }
+    if( [o_table_view numberOfRows] < 1 )
+    {
+        return;
+    }
 
-    if ([o_table_view selectedRow] == [o_table_view numberOfRows]-1 )
+    if[o_table_view selectedRow] == [o_table_view numberOfRows]-1 )
     {
-        i_current =-1;
+        i_current = -1;
     }
     else
     {
              [o_table_view scrollRowToVisible: i_current];
              break;
         }
-    if ( i_current == [o_table_view numberOfRows] - 1 )
+        if( i_current == [o_table_view numberOfRows] - 1 )
         {
              i_current = -1;
         }