]> git.sesse.net Git - vlc/commitdiff
Mac OS X gui: Prevent a crash when dropping item on the playlist.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 12 May 2007 17:57:10 +0000 (17:57 +0000)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 12 May 2007 17:57:10 +0000 (17:57 +0000)
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. */