diff --git a/src/main/java/org/asamk/signal/commands/RegisterCommand.java b/src/main/java/org/asamk/signal/commands/RegisterCommand.java index 971e4dd1..1b7e5ef9 100644 --- a/src/main/java/org/asamk/signal/commands/RegisterCommand.java +++ b/src/main/java/org/asamk/signal/commands/RegisterCommand.java @@ -27,7 +27,8 @@ public class RegisterCommand implements RegistrationCommand { @Override public void handleCommand(final Namespace ns, final RegistrationManager m) throws CommandException { final boolean voiceVerification = ns.getBoolean("voice"); - final var captcha = ns.getString("captcha").replace("signalcaptcha://", ""); + final var captchaString = ns.getString("captcha"); + final var captcha = captchaString == null ? null : captchaString.replace("signalcaptcha://", ""); try { m.register(voiceVerification, captcha);