diff options
Diffstat (limited to 'AppKit')
-rw-r--r-- | AppKit/GTMLargeTypeWindow.m | 10 | ||||
-rw-r--r-- | AppKit/GTMLinearRGBShading.m | 2 | ||||
-rw-r--r-- | AppKit/GTMLoginItems.m | 4 |
3 files changed, 11 insertions, 5 deletions
diff --git a/AppKit/GTMLargeTypeWindow.m b/AppKit/GTMLargeTypeWindow.m index 0c07f87..97847aa 100644 --- a/AppKit/GTMLargeTypeWindow.m +++ b/AppKit/GTMLargeTypeWindow.m @@ -151,7 +151,7 @@ static const CGFloat kTwoThirdsAlpha = 0.66; if (view) { bounds = [view bounds]; } - if (bounds.size.height <= 0 || bounds.size.width <= 0) { + if (!view || bounds.size.height <= 0 || bounds.size.width <= 0) { _GTMDevLog(@"GTMLargeTypeWindow got an empty view"); [self release]; return nil; @@ -271,6 +271,14 @@ static const CGFloat kTwoThirdsAlpha = 0.66; @implementation GTMLargeTypeBackgroundView GTM_METHOD_CHECK(NSBezierPath, gtm_appendBezierPathWithRoundRect:cornerRadius:); +- (void)dealloc { + // If we get released while animating, we'd better clean up. + [animation_ stopAnimation]; + [animation_ release]; + [transition_ release]; + [super dealloc]; +} + - (BOOL)isOpaque { return NO; } diff --git a/AppKit/GTMLinearRGBShading.m b/AppKit/GTMLinearRGBShading.m index af70086..9434186 100644 --- a/AppKit/GTMLinearRGBShading.m +++ b/AppKit/GTMLinearRGBShading.m @@ -98,7 +98,6 @@ static void cShadeFunction(void *info, const CGFloat *inPos, CGFloat *outVals); positionIndex += 1; CGFloat stop2Position = 0.0; NSColor *stop2Color = nil; - NSColor *theColor = nil; if (colorCount > 1) { stop2Color = [self stopAtIndex:positionIndex position:&stop2Position]; positionIndex += 1; @@ -117,7 +116,6 @@ static void cShadeFunction(void *info, const CGFloat *inPos, CGFloat *outVals); if (position <= stop1Position) { // if we are less than our lowest position, return our first color - theColor = stop1Color; [stop1Color getRed:&colorValue_[0] green:&colorValue_[1] blue:&colorValue_[2] alpha:&colorValue_[3]]; } else if (position >= stop2Position) { diff --git a/AppKit/GTMLoginItems.m b/AppKit/GTMLoginItems.m index c3dedfe..f124ef5 100644 --- a/AppKit/GTMLoginItems.m +++ b/AppKit/GTMLoginItems.m @@ -74,7 +74,7 @@ NSString * const kGTMLoginItemsHiddenKey = @"Hide"; NSAppleEventDescriptor *scriptResult = [query executeAndReturnError:&errDict]; if (!scriptResult) { // COV_NF_START - no real way to test this - if (*errorInfo) + if (errorInfo) *errorInfo = [NSError errorWithDomain:@"GTMLoginItems" code:-92 userInfo:errDict]; return NO; // COV_NF_END @@ -108,7 +108,7 @@ NSString * const kGTMLoginItemsHiddenKey = @"Hide"; NSAppleEventDescriptor *scriptResult = [query executeAndReturnError:&errDict]; if (!scriptResult) { // COV_NF_START - no real way to test this - if (*errorInfo) + if (errorInfo) *errorInfo = [NSError errorWithDomain:@"GTMLoginItems" code:-2 userInfo:errDict]; return nil; // COV_NF_END |