mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 21:42:32 +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
|
#pragma mark MPTargetItemResolving
|
||||||
- (NSArray<KPKEntry *> *)currentTargetEntries {
|
- (NSArray<KPKEntry *> *)currentTargetEntries {
|
||||||
NSInteger activeRow = self.entryTable.clickedRow;
|
NSInteger activeRow = self.entryTable.clickedRow;
|
||||||
if(activeRow > -1) {
|
if(activeRow > -1 && activeRow < [self.entryArrayController.arrangedObjects count]) {
|
||||||
return @[ [self.entryArrayController arrangedObjects][activeRow] ];
|
return @[ [self.entryArrayController arrangedObjects][activeRow] ];
|
||||||
}
|
}
|
||||||
return self.entryArrayController.selectedObjects;
|
return self.entryArrayController.selectedObjects;
|
||||||
|
|||||||
Reference in New Issue
Block a user