aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/GeneratePreviewForURL.m1
-rw-r--r--Source/SPColorSelectorView.m2
-rw-r--r--Source/SPConnectionController.m2
-rw-r--r--Source/SPNavigatorController.m2
4 files changed, 4 insertions, 3 deletions
diff --git a/Source/GeneratePreviewForURL.m b/Source/GeneratePreviewForURL.m
index 8aa2bf0a..2e0fc0cb 100644
--- a/Source/GeneratePreviewForURL.m
+++ b/Source/GeneratePreviewForURL.m
@@ -476,6 +476,7 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
if(!iconImages || [iconImages count] < 1)
iconImages = [NSArray arrayWithObject:[NSImage imageNamed:NSImageNameStopProgressTemplate]];
+#warning Shouldn't that be "> 1"?
if([iconImages count] > 0)
iconImage = [iconImages objectAtIndex:1];
else
diff --git a/Source/SPColorSelectorView.m b/Source/SPColorSelectorView.m
index 20a894dd..15b18596 100644
--- a/Source/SPColorSelectorView.m
+++ b/Source/SPColorSelectorView.m
@@ -253,7 +253,7 @@ enum trackingAreaIDs
NSRect colorSquareRect = [self rectForColorViewAtIndex:index];
//make sure the color at index is actually defined
- if(index >= 0 && [colorList objectAtIndex:index] == nil)
+ if(index >= 0 && [colorList objectOrNilAtIndex:index] == nil)
continue;
//do not draw a selection around the X item
diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m
index 12624178..a91f6929 100644
--- a/Source/SPConnectionController.m
+++ b/Source/SPConnectionController.m
@@ -741,7 +741,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2,
{
NSArray *nodes = [self selectedFavoriteNodes];
- return ([nodes count]) ? (SPTreeNode *)[nodes objectAtIndex:0] : nil;
+ return (SPTreeNode *)[nodes objectOrNilAtIndex:0];
}
/**
diff --git a/Source/SPNavigatorController.m b/Source/SPNavigatorController.m
index e721d16b..1a7e52fd 100644
--- a/Source/SPNavigatorController.m
+++ b/Source/SPNavigatorController.m
@@ -389,7 +389,7 @@ static NSComparisonResult compareStrings(NSString *s1, NSString *s2, void* conte
[syncButton setState:NSOffState];
// Select the database and table
- [doc selectDatabase:[pathArray objectAtIndex:1] item:([pathArray count] > 2)?[pathArray objectAtIndex:2]:nil];
+ [doc selectDatabase:[pathArray objectAtIndex:1] item:[pathArray objectOrNilAtIndex:2]];
if(oldState == NSOnState)
[self performSelector:@selector(_setSyncButtonOn) withObject:nil afterDelay:0.1];