From a673aedbb6d757ed2c5860c2e88dbfb30c97cb36 Mon Sep 17 00:00:00 2001 From: Craig Watson Date: Thu, 3 Mar 2016 16:05:40 +0100 Subject: [PATCH] OS X 10.10: Fixed crashing on .ubz export --- src/frameworks/UBPlatformUtils_mac.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frameworks/UBPlatformUtils_mac.mm b/src/frameworks/UBPlatformUtils_mac.mm index a0440537..1bbb6a22 100644 --- a/src/frameworks/UBPlatformUtils_mac.mm +++ b/src/frameworks/UBPlatformUtils_mac.mm @@ -152,12 +152,12 @@ void UBPlatformUtils::setFileType(const QString &filePath, unsigned long fileTyp CFStringRef path = CFStringCreateWithCharacters(0, reinterpret_cast(filePath.unicode()), filePath.length()); const CFIndex maxSize = CFStringGetMaximumSizeOfFileSystemRepresentation(path); UInt8 fileSystemRepresentation[maxSize]; - CFRelease(path); if (!CFStringGetFileSystemRepresentation(path, (char*)fileSystemRepresentation, maxSize)) { return; } + CFRelease(path); OSStatus status = FSPathMakeRefWithOptions(fileSystemRepresentation, kFSPathMakeRefDefaultOptions, &ref, NULL); if (status != noErr) {