From 278063d157751d7097b3957b1444d9136afcacc0 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 10 Jul 2019 05:48:26 +0200 Subject: [PATCH] (CocoaGL) Silence warning when building without HAVE_VULKAN --- gfx/drivers_context/cocoa_gl_ctx.m | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index af40d4a3bd..2bdee23250 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -835,7 +835,10 @@ static void *cocoagl_gfx_ctx_init(video_frame_info_t *video_info, void *video_dr #ifdef HAVE_VULKAN [apple_platform setViewType:APPLE_VIEW_TYPE_VULKAN]; if (!vulkan_context_init(&cocoa_ctx->vk, VULKAN_WSI_MVK_MACOS)) - goto error; + { + free(cocoa_ctx); + return NULL; + } #endif break; 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; - -error: - free(cocoa_ctx); - return NULL; } #ifdef HAVE_COCOA_METAL