summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Gayed <grant_gayed@ca.ibm.com>2012-05-16 12:00:52 -0400
committerGrant Gayed <grant_gayed@ca.ibm.com>2012-05-16 12:00:52 -0400
commitbcc37facb79a5c8c6bd18c658800ff93fd6aaba5 (patch)
tree8d600ae055dd36bbfd661fd977067b5ed0880940
parent8e4bdf9acbc38b789de28c4e2eb8ee055a02fef2 (diff)
downloadeclipse.platform.swt-bcc37facb79a5c8c6bd18c658800ff93fd6aaba5.tar.gz
eclipse.platform.swt-bcc37facb79a5c8c6bd18c658800ff93fd6aaba5.tar.xz
eclipse.platform.swt-bcc37facb79a5c8c6bd18c658800ff93fd6aaba5.zip
Bug 379005 - NullPointerException in Clipboard
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/cocoa/org/eclipse/swt/dnd/Clipboard.java2
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++) {