Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
[#364] fixed crash in contact autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
mackuba committed Apr 23, 2014
1 parent 2adb3f6 commit ce29762
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Hive/Controllers/HIContactAutocompleteWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,12 @@ - (NSPredicate *)filterPredicateForQuery:(NSString *)query {
[params addObjectsFromArray:@[token, token, token, token]];
}

NSString *completePredicate = [predicateParts componentsJoinedByString:@" && "];
return [NSPredicate predicateWithFormat:completePredicate argumentArray:params];
if (predicateParts.count > 0) {
NSString *completePredicate = [predicateParts componentsJoinedByString:@" && "];
return [NSPredicate predicateWithFormat:completePredicate argumentArray:params];
} else {
return nil;
}
}


Expand Down

0 comments on commit ce29762

Please sign in to comment.