From af8fc790677505d196a7f1f1f27fd15f51a1d86e Mon Sep 17 00:00:00 2001 From: Owain van Brakel Date: Wed, 4 Sep 2019 12:36:48 +0200 Subject: [PATCH] profiles: Check for empty password before redrawing the UI --- .../client/plugins/profiles/ProfilesPanel.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 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 160d2ec01d..b1dc2ed5ea 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 @@ -373,6 +373,12 @@ class ProfilesPanel extends PluginPanel private void decryptAccounts() { + if (txtDecryptPassword.getPassword().length == 0 || String.valueOf(txtDecryptPassword.getPassword()).equals(UNLOCK_PASSWORD)) + { + showErrorMessage("Unable to load data", "Please enter a password!"); + return; + } + boolean error = false; try { @@ -472,11 +478,6 @@ class ProfilesPanel extends PluginPanel String tmp = profilesConfig.profilesData(); if (tmp.startsWith("¬")) { - if (txtDecryptPassword.getPassword().length == 0 || String.valueOf(txtDecryptPassword.getPassword()).equals(UNLOCK_PASSWORD)) - { - showErrorMessage("Unable to load data", "Please enter a password!"); - return tmp; - } tmp = tmp.substring(1); return decryptText(base64Decode(tmp), getAesKey()); }