diff --git a/src/osx/core/stdpaths_cf.cpp b/src/osx/core/stdpaths_cf.cpp index 86b34e646c..c5b4571bf0 100644 --- a/src/osx/core/stdpaths_cf.cpp +++ b/src/osx/core/stdpaths_cf.cpp @@ -80,7 +80,7 @@ static wxString BundleRelativeURLToPath(CFURLRef relativeURL) { CFURLRef absoluteURL = CFURLCopyAbsoluteURL(relativeURL); wxCHECK_MSG(absoluteURL, wxEmptyString, wxT("Failed to resolve relative URL to absolute URL")); - CFStringRef cfStrPath = CFURLCopyFileSystemPath(absoluteURL,kDefaultPathStyle); + wxCFStringRef cfStrPath( CFURLCopyFileSystemPath(absoluteURL,kDefaultPathStyle) ); CFRelease(absoluteURL); return wxCFStringRef::AsStringWithNormalizationFormC(cfStrPath); }