diff --git a/SUDiskImageUnarchiver.m b/SUDiskImageUnarchiver.m index a6efcfd08..2f4706fb9 100644 --- a/SUDiskImageUnarchiver.m +++ b/SUDiskImageUnarchiver.m @@ -33,9 +33,12 @@ - (void)extractDMG if (uuid) { CFStringRef uuidString = CFUUIDCreateString(NULL, uuid); + if (uuidString) + { + mountPoint = [@"/Volumes" stringByAppendingPathComponent:(NSString*)uuidString]; + CFRelease(uuidString); + } CFRelease(uuid); - mountPoint = [@"/Volumes" stringByAppendingPathComponent:(NSString*)uuidString]; - CFRelease(uuidString); } } while (noErr == FSPathMakeRefWithOptions((UInt8 *)[mountPoint fileSystemRepresentation], kFSPathMakeRefDoNotFollowLeafSymlink, &tmpRef, NULL)); diff --git a/SUHost.m b/SUHost.m index 055c41b8c..fb4ce4124 100644 --- a/SUHost.m +++ b/SUHost.m @@ -108,8 +108,8 @@ - (BOOL)isBackgroundApplication { ProcessSerialNumber PSN; GetCurrentProcess(&PSN); - NSDictionary * processInfo = (NSDictionary *)ProcessInformationCopyDictionary(&PSN, kProcessDictionaryIncludeAllInformationMask); - BOOL isElement = [[processInfo objectForKey:@"LSUIElement"] boolValue]; + CFDictionaryRef processInfo = ProcessInformationCopyDictionary(&PSN, kProcessDictionaryIncludeAllInformationMask); + BOOL isElement = [[(NSDictionary *)processInfo objectForKey:@"LSUIElement"] boolValue]; if (processInfo) CFRelease(processInfo); return isElement;