mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 19:22:25 +00:00
protected agains wrong index usage on selection retrieval
This commit is contained in:
@@ -376,7 +376,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
||||
#pragma mark MPTargetItemResolving
|
||||
- (NSArray<KPKEntry *> *)currentTargetEntries {
|
||||
NSInteger activeRow = self.entryTable.clickedRow;
|
||||
if(activeRow > -1) {
|
||||
if(activeRow > -1 && activeRow < [self.entryArrayController.arrangedObjects count]) {
|
||||
return @[ [self.entryArrayController arrangedObjects][activeRow] ];
|
||||
}
|
||||
return self.entryArrayController.selectedObjects;
|
||||
|
||||
Reference in New Issue
Block a user