From 80e6f1ca8c4ade531c95e8186c32b69477baf2df Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Sun, 8 Aug 2021 02:17:08 +0200 Subject: [PATCH] ngl: Make current when unrealizing The profiler (at least) discards GL objects and we want to discard them on the right context. --- gsk/ngl/gsknglrenderer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gsk/ngl/gsknglrenderer.c b/gsk/ngl/gsknglrenderer.c index 5f8a683b1e..cdb6717043 100644 --- a/gsk/ngl/gsknglrenderer.c +++ b/gsk/ngl/gsknglrenderer.c @@ -137,9 +137,11 @@ gsk_ngl_renderer_unrealize (GskRenderer *renderer) g_assert (GSK_IS_NGL_RENDERER (renderer)); + gdk_gl_context_make_current (self->context); + g_clear_object (&self->driver); - g_clear_object (&self->context); g_clear_object (&self->command_queue); + g_clear_object (&self->context); } static cairo_region_t *