Skip to content

Ghidra is a software reverse engineering (SRE) framework

check for existence of bundle paths on restoreState

Jason P. Leasure3cb05554538d
diff --git a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/BundleHost.java b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/BundleHost.java
index cfd3933d5e..e26e157425 100644
--- a/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/BundleHost.java
+++ b/Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/osgi/BundleHost.java
@@ -705,6 +705,12 @@ public class BundleHost {
for (int i = 0; i < pathArr.length; i++) {
ResourceFile bp = new ResourceFile(pathArr[i]);
+ if (!bp.exists()) {
+ Msg.showWarn(this, null, "missing bundle path",
+ "the bundle path " + bp.toString() + " no longer exists, removing");
+
+ continue;
+ }
boolean en = enableArr[i];
boolean sys = systemArr[i];
GhidraBundle gb = bp2gb.get(bp);