Browse Source

Bug: fix minor bug in last commit.

Ugochukwu Mmaduekwe 7 years ago
parent
commit
37567382ea
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/gui/UFRMAccountExplorer.pas

+ 6 - 2
src/gui/UFRMAccountExplorer.pas

@@ -697,13 +697,17 @@ var
   LIdx, LCurrentIndex: integer;
   LNewName: string;
 begin
-  if (cbAccounts.ItemIndex <= 0) then
+  if (cbAccounts.ItemIndex <= 0) then begin
     ShowMessage('You Must Select a Valid Key');
+    Exit;
+  end;
   LIdx := TWallet.Keys.IndexOfAccountKey(TBox<TAccountKey>(
     cbAccounts.Items.Objects[cbAccounts.ItemIndex]).Value);
 
-  if (LIdx < 0) or (LIdx >= TWallet.Keys.Count) then
+  if (LIdx < 0) or (LIdx >= TWallet.Keys.Count) then begin
     ShowMessage('You Must Select a Valid Key');
+    Exit;
+  end;
 
   LCurrentIndex := cbAccounts.ItemIndex;
   if InputQuery('Change Key Name', 'Input New Name', LNewName) then