Bug 470153 - Very slow project delete/refresh on Mac since Mars

Protect against NPE.

Change-Id: Ieb91f5c1f60cce286ef59bde1580419f996b92c8
diff --git a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/FileUtil.java b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/FileUtil.java
index 8730e66..e992fc8 100644
--- a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/FileUtil.java
+++ b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/FileUtil.java
@@ -111,7 +111,7 @@
 						}
 					});
 					String realName;
-					if (names.length == 0) {
+					if (names == null || names.length == 0) {
 						// The remainder of the path doesn't exist on the file system - copy from
 						// the original path.
 						realPath = realPath.append(path.removeFirstSegments(realPath.segmentCount()));