Permalink
Browse files

Fix bugs identified by clang static analyzer.

Signed-off-by: Jonathan 'Wolf' Rentzsch <jwr.git@redshed.net>
  • Loading branch information...
1 parent e6d5ef1 commit 0236542d1adc5d0aece70ab37b4276e01da32171 @lapcat lapcat committed with Jul 6, 2009
Showing with 5 additions and 3 deletions.
  1. +1 −1 Plugin/CTGradient.m
  2. +2 −2 Plugin/Plugin.m
  3. +2 −0 Plugin/SparkleManager.m
View
@@ -53,7 +53,7 @@ - (void)dealloc
{
CGFunctionRelease(gradientFunction);
- CTGradientElement *elementToRemove = elementList;
+ CTGradientElement *elementToRemove;
while(elementList != nil)
{
elementToRemove = elementList;
View
@@ -818,7 +818,7 @@ - (void) _drawGearIcon
NSColor *startingColor = [NSColor colorWithDeviceWhite:1.0 alpha:1.0];
NSColor *endingColor = [NSColor colorWithDeviceWhite:1.0 alpha:0.0];
- [gradient initWithStartingColor:startingColor endingColor:endingColor];
+ gradient = [gradient initWithStartingColor:startingColor endingColor:endingColor];
// draw gradient behind gear so that it's visible even on dark backgrounds
[gradient drawFromCenter:gearImageCenter
@@ -857,7 +857,7 @@ - (void) _drawBackground
id gradient = [NSClassFromString(@"NSGradient") alloc];
if (gradient != nil)
{
- [gradient initWithStartingColor:startingColor endingColor:endingColor];
+ gradient = [gradient initWithStartingColor:startingColor endingColor:endingColor];
[gradient drawInBezierPath:[NSBezierPath bezierPathWithRect:fillRect] angle:90.0 + ((mouseIsDown && mouseInside) ? 0.0 : 180.0)];
View
@@ -30,6 +30,8 @@ of this software and associated documentation files (the "Software"), to deal
#import "CTFUserDefaultsController.h"
#import "CTFPreferencesDictionary.h"
+#import <objc/runtime.h>
+
// NSUserDefaults keys
static NSString *sAutomaticallyCheckForUpdates = @"checkForUpdatesOnFirstLoad";

0 comments on commit 0236542

Please sign in to comment.