diff --git a/LaunchServer/src/main/java/ru/gravit/launchserver/command/service/SwapAuthProviderCommand.java b/LaunchServer/src/main/java/ru/gravit/launchserver/command/service/SwapAuthProviderCommand.java index 97fac0b2..5e89def9 100644 --- a/LaunchServer/src/main/java/ru/gravit/launchserver/command/service/SwapAuthProviderCommand.java +++ b/LaunchServer/src/main/java/ru/gravit/launchserver/command/service/SwapAuthProviderCommand.java @@ -53,9 +53,13 @@ public void invoke(String... args) throws Exception { } else if(args[1].equals("undo")) { if(providersCache[index] == null) LogHelper.error("Cache clean. Undo impossible"); - server.config.authProvider[index].close(); - server.config.authProvider[index] = providersCache[index]; - providersCache[index] = null; + else + { + server.config.authProvider[index].close(); + server.config.authProvider[index] = providersCache[index]; + providersCache[index] = null; + } + } } }