Skip to content

Commit

Permalink
check that the array isn't empty before trying to return its contents -
Browse files Browse the repository at this point in the history
fixes #268
  • Loading branch information
skurfer committed Apr 30, 2011
1 parent eb37afb commit dba0ec3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Quicksilver/Code-QuickStepInterface/QSInterfaceController.m
Expand Up @@ -331,8 +331,14 @@ - (void)searchArray:(NSArray *)array {

- (void)showArray:(NSArray *)array {
// display the results list with these items
// put the first item from the array into the first pane
[self showArray:array withDirectObject:[array objectAtIndex:0]];
if (array && [array count] > 0) {
// put the first item from the array into the first pane
[self showArray:array withDirectObject:[array objectAtIndex:0]];
} else {
// nothing to display - present a blank interface
[self showArray:array withDirectObject:nil];
}

[dSelector showResultView:self];
}

Expand Down

0 comments on commit dba0ec3

Please sign in to comment.