(CocoaGL) Silence warning when building without HAVE_VULKAN

This commit is contained in:
twinaphex 2019-07-10 05:48:26 +02:00
parent 9394a31277
commit 278063d157
1 changed files with 4 additions and 5 deletions

View File

@ -835,7 +835,10 @@ static void *cocoagl_gfx_ctx_init(video_frame_info_t *video_info, void *video_dr
#ifdef HAVE_VULKAN #ifdef HAVE_VULKAN
[apple_platform setViewType:APPLE_VIEW_TYPE_VULKAN]; [apple_platform setViewType:APPLE_VIEW_TYPE_VULKAN];
if (!vulkan_context_init(&cocoa_ctx->vk, VULKAN_WSI_MVK_MACOS)) if (!vulkan_context_init(&cocoa_ctx->vk, VULKAN_WSI_MVK_MACOS))
goto error; {
free(cocoa_ctx);
return NULL;
}
#endif #endif
break; break;
case GFX_CTX_NONE: case GFX_CTX_NONE:
@ -844,10 +847,6 @@ static void *cocoagl_gfx_ctx_init(video_frame_info_t *video_info, void *video_dr
} }
return cocoa_ctx; return cocoa_ctx;
error:
free(cocoa_ctx);
return NULL;
} }
#ifdef HAVE_COCOA_METAL #ifdef HAVE_COCOA_METAL