diff --git a/gfx/drivers/gl_core.c b/gfx/drivers/gl_core.c index 564d33b45b..4606551637 100644 --- a/gfx/drivers/gl_core.c +++ b/gfx/drivers/gl_core.c @@ -1541,10 +1541,10 @@ static void gl_core_free(void *data) gl_core_context_bind_hw_render(gl, false); font_driver_free_osd(); - gl_core_destroy_resources(gl); if (gl->ctx_driver && gl->ctx_driver->destroy) gl->ctx_driver->destroy(gl->ctx_data); video_context_driver_free(); + gl_core_destroy_resources(gl); } static bool gl_core_alive(void *data)