From f5c2aa9fedee978512363f884cf90b87febb6467 Mon Sep 17 00:00:00 2001 From: michael starke Date: Mon, 24 Apr 2017 11:43:38 +0200 Subject: [PATCH] protected agains wrong index usage on selection retrieval --- MacPass/MPEntryViewController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MacPass/MPEntryViewController.m b/MacPass/MPEntryViewController.m index c09fa089..274d738a 100644 --- a/MacPass/MPEntryViewController.m +++ b/MacPass/MPEntryViewController.m @@ -376,7 +376,7 @@ NSString *const _MPTableSecurCellView = @"PasswordCell"; #pragma mark MPTargetItemResolving - (NSArray *)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;