Skip to content

Commit 5fb5866

Browse files
committed
Merge remote-tracking branch 'origin/GP-0_Dan_testFixes-2025-04-14-1'
2 parents f00de10 + 7d5e863 commit 5fb5866

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

Ghidra/Debug/ProposedUtils/src/main/java/generic/depends/DependentServiceResolver.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,15 @@ public void injectServices(T obj) throws ServiceConstructionException {
144144
constructed.put(cons.method, service);
145145
}
146146
instancesByClass.put(cons.cls, service);
147-
for (Field f : fieldsByClass.remove(cons.cls)) {
148-
try {
149-
f.set(obj, service);
150-
}
151-
catch (IllegalArgumentException | IllegalAccessException e) {
152-
throw new AssertionError(e);
147+
Set<Field> fields = fieldsByClass.remove(cons.cls);
148+
if (fields != null) {
149+
for (Field f : fields) {
150+
try {
151+
f.set(obj, service);
152+
}
153+
catch (IllegalArgumentException | IllegalAccessException e) {
154+
throw new AssertionError(e);
155+
}
153156
}
154157
}
155158
}

0 commit comments

Comments
 (0)