Skip to content
Snippets Groups Projects
Commit 217b5e17 authored by George Nachman's avatar George Nachman
Browse files

Don't crash when you delete a password manager entry that is your only one and...

Don't crash when you delete a password manager entry that is your only one and you are editing the password
parent c968c882
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -236,6 +236,7 @@ static BOOL sAuthenticated;
if (sAuthenticated) {
NSInteger selectedRow = [_tableView selectedRow];
NSString *selectedAccountName = [self accountNameForRow:selectedRow];
[_tableView reloadData];
[[self keychain] deletePasswordForService:kServiceName account:selectedAccountName];
[self reloadAccounts];
[self passwordsDidChange];
Loading
Loading
@@ -469,6 +470,9 @@ objectValueForTableColumn:(NSTableColumn *)aTableColumn
if (!sAuthenticated) {
return;
}
if (rowIndex < 0 || rowIndex >= _accounts.count) {
ITCriticalError(NO, @"Row index %@ out of bounds [0, %@)", @(rowIndex), @(_accounts.count));
}
NSString *accountName = [self accountNameForRow:rowIndex];
if (aTableColumn == _accountNameColumn) {
NSError *error = nil;
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment