[vlc-commits] macosx: avoid possible index out of range problem in bookmarks table view

David Fuhrmann git at videolan.org
Sun Jul 20 17:35:42 CEST 2014


vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Sun Jul 20 17:35:24 2014 +0200| [45640caa8890442b3743a77deb30a57fdbbbe94e] | committer: David Fuhrmann

macosx: avoid possible index out of range problem in bookmarks table view

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=45640caa8890442b3743a77deb30a57fdbbbe94e
---

 modules/gui/macosx/bookmarks.m |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/gui/macosx/bookmarks.m b/modules/gui/macosx/bookmarks.m
index e82479a..adb1b6a 100644
--- a/modules/gui/macosx/bookmarks.m
+++ b/modules/gui/macosx/bookmarks.m
@@ -397,6 +397,8 @@ clear:
         return @"";
     else if (input_Control(p_input, INPUT_GET_BOOKMARKS, &pp_bookmarks, &i_bookmarks) != VLC_SUCCESS)
         ret = @"";
+    else if (row >= i_bookmarks)
+        ret = @"";
     else {
         NSString * identifier = [theTableColumn identifier];
         if ([identifier isEqualToString: @"description"])



More information about the vlc-commits mailing list