Oops! Committed the last patch with broken code; this code works.

This commit is contained in:
andym committed 2008-02-05 03:32:17 +00:00
1 parent 5b76530d3a
commit 5bf76dd7a3
1 file changed
+5 -9
+5 -9
View File
@@ -51,15 +51,11 @@ static SUUpdater *sharedUpdater = nil;
- (id)init
{
if (self = [super init]) {
if (sharedUpdater == nil) {
[self setHostBundle:[NSBundle mainBundle]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidFinishLaunching:) name:NSApplicationDidFinishLaunchingNotification object:NSApp];
} else if (self != sharedUpdater) {
// this should never happen
[self release];
self = [sharedUpdater retain];
}
self = [super init];
if (self)
{
[self setHostBundle:[NSBundle mainBundle]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidFinishLaunching:) name:NSApplicationDidFinishLaunchingNotification object:NSApp];
}
return self;
}