Bug 558937 - NPE in Smart Import Wizard pressing Directory... button

Change-Id: I1aa2d1480f8eda5f1c08cc9f49c349dca290ff63
Signed-off-by: Thomas Singer <ts-swt@syntevo.com>
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java
index 35d9deb..e8a247e 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/DirectoryDialog.java
@@ -148,6 +148,9 @@
 public String open () {
 	directoryPath = null;
 	panel = NSOpenPanel.openPanel();
+	if (panel == null) {
+		return null;
+	}
 
 	/*
 	 * This line is intentionally commented. Don't show hidden files forcefully,