]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/playlist.m
Mac OS X gui: Prevent a crash when dropping item on the playlist.
[vlc] / modules / gui / macosx / playlist.m
index 0d0b5450d61b51ad0ab2025893f813f089f89509..f2562128469fea7e46b35ac4411680d6844b0c18 100644 (file)
         }
     }
 
+    /* Don't allow on drop on playlist root element's child */
+    if( !item && index != NSOutlineViewDropOnItemIndex)
+    {
+        vlc_object_release( p_playlist );
+        return NSDragOperationNone;
+    }
+
     /* We refuse to drop an item in anything else than a child of the General
        Node. We still accept items that would be root nodes of the outlineview
        however, to allow drop in an empty playlist. */