Bug 562061 - [weaving] Avoid weaving for bundles with no base file

Change-Id: If31b32379227840a070b081263a99e343e4d1bee
Signed-off-by: Thomas Watson <tjwatson@us.ibm.com>
diff --git a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingHook.java b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingHook.java
index ca45ea2..fac529a 100644
--- a/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingHook.java
+++ b/bundles/org.eclipse.equinox.weaving.hook/src/org/eclipse/equinox/weaving/hooks/WeavingHook.java
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * Copyright (c) 2006, 2014 IBM Corporation and others.
+ * Copyright (c) 2006, 2020 IBM Corporation and others.
  *
  * This program and the accompanying materials
  * are made available under the terms of the Eclipse Public License 2.0
@@ -223,6 +223,10 @@
      */
     public BundleFileWrapper wrapBundleFile(final BundleFile bundleFile,
             final Generation generation, final boolean base) {
+        if (bundleFile.getBaseFile() == null) {
+            // must have a base file to work
+            return null;
+        }
         BundleFileWrapper wrapped = null;
         if (Debug.DEBUG_BUNDLE)
             Debug.println("> WeavingHook.wrapBundleFile() bundle="