mirror of
https://github.com/hholtmann/smcFanControl.git
synced 2025-11-04 19:49:16 +01:00
Fix compile warning
Fix crash if smc failed to get current authorization during first use
This commit is contained in:
@ -27,8 +27,10 @@
|
||||
|
||||
|
||||
- (id)init:(NSString*)p_machine{
|
||||
machine=[MachineDefaults computerModel];
|
||||
supported_machines=[[NSArray alloc] initWithContentsOfFile:[[[NSFileManager defaultManager] applicationSupportDirectory] stringByAppendingPathComponent:@"Machines.plist"]];
|
||||
if (self = [super init]){
|
||||
machine=[MachineDefaults computerModel];
|
||||
supported_machines=[[NSArray alloc] initWithContentsOfFile:[[[NSFileManager defaultManager] applicationSupportDirectory] stringByAppendingPathComponent:@"Machines.plist"]];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@ -83,7 +85,7 @@
|
||||
[xmldata writeToFile:[[[NSFileManager defaultManager] applicationSupportDirectory] stringByAppendingPathComponent:@"Machines.plist"] atomically:YES];
|
||||
[supported_m release];
|
||||
//return new machine-live-data
|
||||
return [new_machine retain];
|
||||
return new_machine;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user