(Cocoa) Fix small leak

This commit is contained in:
Twinaphex 2017-10-01 09:33:53 +02:00
parent a11d04f252
commit 59f7a59b3f

View File

@ -247,7 +247,10 @@ static void *cocoagl_gfx_ctx_init(video_frame_info_t *video_info, void *video_dr
static void cocoagl_gfx_ctx_destroy(void *data)
{
(void)data;
cocoa_ctx_data_t *cocoa_ctx = (cocoa_ctx_data_t*)data;
if (!cocoa_ctx)
return;
[GLContextClass clearCurrentContext];
@ -268,6 +271,8 @@ static void cocoagl_gfx_ctx_destroy(void *data)
#endif
[GLContextClass clearCurrentContext];
g_context = nil;
free(cocoa_ctx);
}
static bool cocoagl_gfx_ctx_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor)