Fixed some rare crashes.
[FIXED] Crash for users with no name. [FIXED] Crash when copying an element with no content.
This commit is contained in:
parent
27d0373a6e
commit
2a48c9d272
Binary file not shown.
Binary file not shown.
2
External/Pearl
vendored
2
External/Pearl
vendored
@ -1 +1 @@
|
|||||||
Subproject commit bf632ec1c6ec6a1b3037a0933cede0c64fae68a3
|
Subproject commit 4125775291e209a55991743c5c1c18f7fc590e14
|
@ -16,8 +16,10 @@
|
|||||||
static NSDictionary *keyQuery(MPUserEntity *user) {
|
static NSDictionary *keyQuery(MPUserEntity *user) {
|
||||||
|
|
||||||
return [PearlKeyChain createQueryForClass:kSecClassGenericPassword
|
return [PearlKeyChain createQueryForClass:kSecClassGenericPassword
|
||||||
attributes:@{(__bridge id)kSecAttrService: @"Saved Master Password",
|
attributes:@{
|
||||||
(__bridge id)kSecAttrAccount: user.name}
|
(__bridge id)kSecAttrService: @"Saved Master Password",
|
||||||
|
(__bridge id)kSecAttrAccount: IfNotNilElse(user.name, @"")
|
||||||
|
}
|
||||||
matches:nil];
|
matches:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -485,11 +485,13 @@
|
|||||||
|
|
||||||
- (IBAction)copyContent {
|
- (IBAction)copyContent {
|
||||||
|
|
||||||
if (!self.activeElement)
|
id content = self.activeElement.content;
|
||||||
|
if (!content)
|
||||||
|
// Nothing to copy.
|
||||||
return;
|
return;
|
||||||
|
|
||||||
inf(@"Copying password for: %@", self.activeElement.name);
|
inf(@"Copying password for: %@", self.activeElement.name);
|
||||||
[UIPasteboard generalPasteboard].string = [self.activeElement.content description];
|
[UIPasteboard generalPasteboard].string = [content description];
|
||||||
|
|
||||||
[self showContentTip:@"Copied!" withIcon:nil];
|
[self showContentTip:@"Copied!" withIcon:nil];
|
||||||
|
|
||||||
|
@ -554,6 +554,10 @@
|
|||||||
|
|
||||||
- (void)tryMasterPassword {
|
- (void)tryMasterPassword {
|
||||||
|
|
||||||
|
if (!self.selectedUser)
|
||||||
|
// No user selected, can't try sign-in.
|
||||||
|
return;
|
||||||
|
|
||||||
[self setSpinnerActive:YES];
|
[self setSpinnerActive:YES];
|
||||||
|
|
||||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||||
|
Loading…
Reference in New Issue
Block a user