Bug 531395 - Avoid potential NPE in configureAntObject

Change-Id: Icd81cda279fa9edb321634706bcc97cfe16d352a
Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
diff --git a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
index 02df242..889ecaa 100644
--- a/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
+++ b/ant/org.eclipse.ant.core/src/org/eclipse/ant/core/AntCorePreferences.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2000, 2017 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License v1.0
  * which accompanies this distribution, and is available at
@@ -687,7 +687,9 @@
 		} else {
 			try {
 				URL fileURL = FileLocator.toFileURL(bundle.getEntry(library));
-				urlFile = URIUtil.toFile(URIUtil.toURI(fileURL));
+				if (fileURL != null) {
+					urlFile = URIUtil.toFile(URIUtil.toURI(fileURL));
+				}
 			}
 			catch (URISyntaxException e) {
 				AntCorePlugin.log(e);