diff options
author | thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-02-27 22:22:04 +0000 |
---|---|---|
committer | thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3> | 2009-02-27 22:22:04 +0000 |
commit | b1df2944b71fad420fd04607e16a80d7591a3c1b (patch) | |
tree | 3fa28cacbe452530757e88444d8f0aa0ee3bb63c /AppKit/GTMLargeTypeWindow.m | |
parent | 3388ce723f73ae47db17a9c7c3c3f766d566d0f7 (diff) |
a few fixes (and bug fix) found by clang
Diffstat (limited to 'AppKit/GTMLargeTypeWindow.m')
-rw-r--r-- | AppKit/GTMLargeTypeWindow.m | 10 |
1 files changed, 9 insertions, 1 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; } |