Cocoa: Cleanup

This commit is contained in:
Camilla Löwy 2022-07-07 22:48:03 +02:00
parent 78b19548d9
commit 2db528d8cd

View File

@ -464,9 +464,9 @@ void* _glfwLoadLocalVulkanLoaderCocoa(void)
if (!frameworksUrl)
return NULL;
CFURLRef url = CFURLCreateCopyAppendingPathComponent(
CFURLRef loaderUrl = CFURLCreateCopyAppendingPathComponent(
kCFAllocatorDefault, frameworksUrl, CFSTR("libvulkan.1.dylib"), false);
if (!url)
if (!loaderUrl)
{
CFRelease(frameworksUrl);
return NULL;
@ -475,10 +475,10 @@ void* _glfwLoadLocalVulkanLoaderCocoa(void)
char path[PATH_MAX];
void* handle = NULL;
if (CFURLGetFileSystemRepresentation(url, true, (UInt8*) path, sizeof(path) - 1))
if (CFURLGetFileSystemRepresentation(loaderUrl, true, (UInt8*) path, sizeof(path) - 1))
handle = _glfwPlatformLoadModule(path);
CFRelease(url);
CFRelease(loaderUrl);
CFRelease(frameworksUrl);
return handle;
}