diff options
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java index 28bec965e9..9b59b690b2 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java @@ -519,6 +519,7 @@ public TransferData[] getAvailableTypes(int clipboards) { NSPasteboard pasteboard = NSPasteboard.generalPasteboard(); if (pasteboard == null) return new TransferData[0]; NSArray types = pasteboard.types(); + if (types == null) return new TransferData[0]; int count = (int)/*64*/types.count(); TransferData[] result = new TransferData[count]; for (int i = 0; i < count; i++) { @@ -549,6 +550,7 @@ public String[] getAvailableTypeNames() { NSPasteboard pasteboard = NSPasteboard.generalPasteboard(); if (pasteboard == null) return new String[0]; NSArray types = pasteboard.types(); + if (types == null) return new String[0]; int count = (int)/*64*/types.count(); String[] result = new String[count]; for (int i = 0; i < count; i++) { |