Report an unknown platform instead of failing with NPE

This commit is contained in:
Kirill Zhumarin 2026-11-24 14:32:34 +03:00
parent a9426677c2
commit 639f3b8fde

View file

@ -382,7 +382,7 @@ public class SetupSiemensFullflash extends GhidraScript {
if (isInteractive()) {
askOptions(options, devices);
}
if (!PLATFORMS.contains(options.platform)) {
if (options.platform == null || !PLATFORMS.contains(options.platform)) {
throw new IllegalArgumentException("Platform is unknown: choose it in the dialog or pass platform=" + String.join("|", PLATFORMS));
}
println("Swilib target: " + options.target + ", platform: " + options.platform);