mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Oops! Committed the last patch with broken code; this code works.
This commit is contained in:
1 parent
5b76530d3a
commit
5bf76dd7a3
1 file changed
+5
-9
+5
-9
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user