Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix bugs identified by clang static analyzer.
Signed-off-by: Jonathan 'Wolf' Rentzsch <jwr.git@redshed.net>
  • Loading branch information
lapcat authored and rentzsch committed Feb 20, 2009
1 parent 2aa30c6 commit aced770
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 1 addition & 3 deletions Plugin/CTFMenubarMenuController.m
Expand Up @@ -125,8 +125,6 @@ - (id) init
}

self = [ super init ];

sSingleton = self;

if( self ) {
if( ! [ NSBundle loadNibNamed: @"MenubarMenu" owner: self ] )
Expand Down Expand Up @@ -187,7 +185,7 @@ - (void) awakeFromNib
+ (CTFMenubarMenuController*) sharedController
{
if( !sSingleton )
[ [ CTFMenubarMenuController alloc ] init ];
sSingleton = [ [ CTFMenubarMenuController alloc ] init ];

return sSingleton;
}
Expand Down
6 changes: 2 additions & 4 deletions Plugin/Plugin.m
Expand Up @@ -86,9 +86,6 @@ - (id) initWithArguments:(NSDictionary *)arguments
{
self = [super init];
if (self) {
// get defaults
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];

self.webView = [[[arguments objectForKey:WebPlugInContainerKey] webFrame] webView];

self.container = [arguments objectForKey:WebPlugInContainingElementKey];
Expand Down Expand Up @@ -133,7 +130,7 @@ - (id) initWithArguments:(NSDictionary *)arguments
#endif

_fromYouTube = [self.host isEqualToString:@"www.youtube.com"]
|| [flashvars rangeOfString: @"www.youtube.com"].location != NSNotFound;
|| ( flashvars != nil && [flashvars rangeOfString: @"www.youtube.com"].location != NSNotFound );

// Handle if this is loading from whitelist

Expand Down Expand Up @@ -208,6 +205,7 @@ - (void) dealloc
self.container = nil;
self.host = nil;
self.webView = nil;
self.baseURL = nil;

[_flashVars release];
[_badgeText release];
Expand Down

0 comments on commit aced770

Please sign in to comment.