From f3916c8cb2436f0afc9b869f27702f78e8e7b7a4 Mon Sep 17 00:00:00 2001 From: Owain van Brakel Date: Mon, 19 Aug 2019 02:31:10 +0200 Subject: [PATCH] profilepanel: Don't remove the login box when the password is incorrect (#1393) --- .../plugins/profiles/ProfilesPanel.java | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/profiles/ProfilesPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/profiles/ProfilesPanel.java index a5dec0080a..c4048d516c 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/profiles/ProfilesPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/profiles/ProfilesPanel.java @@ -156,20 +156,27 @@ class ProfilesPanel extends PluginPanel @Override public void mousePressed(MouseEvent e) { + boolean error = false; try { - remove(loginPanel); - add(accountPanel, BorderLayout.CENTER); - - profilesPanel.setLayout(new DynamicGridLayout(0, 1, 0, 3)); - add(profilesPanel, BorderLayout.SOUTH); - redrawProfiles(); } catch (InvalidKeySpecException | NoSuchAlgorithmException | IllegalBlockSizeException | InvalidKeyException | BadPaddingException | NoSuchPaddingException ex) { + error = true; showErrorMessage("Unable to load data", "Incorrect password!"); } + + if (error) + { + return; + } + + remove(loginPanel); + add(accountPanel, BorderLayout.CENTER); + + profilesPanel.setLayout(new DynamicGridLayout(0, 1, 0, 3)); + add(profilesPanel, BorderLayout.SOUTH); } @Override