mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-03 17:59:46 +02:00
Merge remote-tracking branch
'origin/GP-5739_d-millar_NPE_fix_rebased_11.4' into Ghidra_11.4 (Closes #8227)
This commit is contained in:
commit
f19b9d710c
1 changed files with 15 additions and 7 deletions
|
@ -402,14 +402,22 @@ public abstract class AbstractTraceRmiLaunchOffer implements TraceRmiLaunchOffer
|
||||||
args.put(param.name(), param.decode(str));
|
args.put(param.name(), param.decode(str));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// Perhaps wrong type; was saved in older version.
|
// NB: This code handles parameters formatted via a previous version.
|
||||||
Object fallback = ConfigStateField.getState(state, param.type(), param.name());
|
// The try-catch was introduced to avoid NPEs from null file paths
|
||||||
if (fallback != null) {
|
try {
|
||||||
args.put(param.name(), ValStr.from(fallback));
|
// Perhaps wrong type; was saved in older version.
|
||||||
continue;
|
Object fallback = ConfigStateField.getState(state, param.type(), param.name());
|
||||||
|
if (fallback != null) {
|
||||||
|
args.put(param.name(), ValStr.from(fallback));
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Msg.warn(this, "Could not load saved launcher arg '%s' (%s)".formatted(param.name(),
|
||||||
|
param.display()));
|
||||||
|
}
|
||||||
|
catch (Exception e) {
|
||||||
|
Msg.warn(this, "Could not load saved launcher arg '%s' (%s) - %s".formatted(param.name(),
|
||||||
|
param.display(), e.getMessage()));
|
||||||
}
|
}
|
||||||
Msg.warn(this, "Could not load saved launcher arg '%s' (%s)".formatted(param.name(),
|
|
||||||
param.display()));
|
|
||||||
}
|
}
|
||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue