[winforms,fix] Prevent Clipboard APIs from running any Idle handlers
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms.CarbonInternal / Dnd.cs
index 24e6bb9c1feedf8880a148c2e45f8534e1cb362a..66a3bc43b790408e1024ed0144461f1e65a3ebfa 100644 (file)
@@ -50,7 +50,11 @@ namespace System.Windows.Forms.CarbonInternal {
                private static DragTrackingDelegate DragTrackingHandler = new DragTrackingDelegate (TrackingCallback);
 
                static Dnd () {
-                       InstallTrackingHandler (DragTrackingHandler, IntPtr.Zero, IntPtr.Zero);
+                       try {
+                               InstallTrackingHandler (DragTrackingHandler, IntPtr.Zero, IntPtr.Zero);
+                       } catch (EntryPointNotFoundException) {
+                               // it is deprecated in 10.6 and does not exist anymore.
+                       }
                }
 
                internal Dnd () {