From 3828e4ced24e5f8125a5d95c78a1c7e0c9bed39a Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Mon, 20 Jun 2011 22:32:37 +0000 Subject: - Fix exceptions seen in 0.9.9RC related to query favorites with nil query texts (L2239) - Update localisable strings --- Source/SPCustomQuery.m | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Source/SPCustomQuery.m') diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m index e51da22c..eacffe3b 100644 --- a/Source/SPCustomQuery.m +++ b/Source/SPCustomQuery.m @@ -3408,7 +3408,9 @@ initWithString:([favorite objectForKey:@"tabtrigger"] && [(NSString*)[favorite objectForKey:@"tabtrigger"] length]) ? [NSString stringWithFormat:@"%@\t%@⇥", [favorite objectForKey:@"name"], [favorite objectForKey:@"tabtrigger"]] : [favorite objectForKey:@"name"] attributes:attributes] autorelease]; NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:@"" action:NULL keyEquivalent:@""]; - [item setToolTip:[NSString stringWithString:[favorite objectForKey:@"query"]]]; + if ([favorite objectForKey:@"query"]) { + [item setToolTip:[NSString stringWithString:[favorite objectForKey:@"query"]]]; + } [item setAttributedTitle:titleString]; [item setIndentationLevel:1]; [menu addItem:item]; @@ -3433,7 +3435,9 @@ initWithString:([favorite objectForKey:@"tabtrigger"] && [(NSString*)[favorite objectForKey:@"tabtrigger"] length]) ? [NSString stringWithFormat:@"%@\t%@⇥", [favorite objectForKey:@"name"], [favorite objectForKey:@"tabtrigger"]] : [favorite objectForKey:@"name"] attributes:attributes] autorelease]; NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:@"" action:NULL keyEquivalent:@""]; - [item setToolTip:[NSString stringWithString:[favorite objectForKey:@"query"]]]; + if ([favorite objectForKey:@"query"]) { + [item setToolTip:[NSString stringWithString:[favorite objectForKey:@"query"]]]; + } [item setAttributedTitle:titleString]; [item setIndentationLevel:1]; [menu addItem:item]; -- cgit v1.2.3