vlc | branch: master | Felix Paul Kühne <[email protected]> | Thu Dec  6 
17:05:57 2012 +1100| [a0442893663ac58aa5b5e8cb098951a0aa499878] | committer: 
Felix Paul Kühne

macosx: fix crash when re-ordering playlist items

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

 modules/gui/macosx/playlist.m |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/gui/macosx/playlist.m b/modules/gui/macosx/playlist.m
index ee1d06a..b1531a9 100644
--- a/modules/gui/macosx/playlist.m
+++ b/modules/gui/macosx/playlist.m
@@ -1478,6 +1478,9 @@
 
     /* Drag & Drop inside the playlist */
     if ([[o_pasteboard types] containsObject: @"VLCPlaylistItemPboardType"]) {
+        if (index == -1) // this is no valid target, sanitize to top of table
+            index = 0;
+
         int i_row = 0;
         playlist_item_t *p_new_parent, *p_item = NULL;
         NSArray *o_all_items = [o_nodes_array arrayByAddingObjectsFromArray: 
o_items_array];

_______________________________________________
vlc-commits mailing list
[email protected]
http://mailman.videolan.org/listinfo/vlc-commits

Reply via email to