diff --git a/cogl/cogl-pango/cogl-pango-render.c b/cogl/cogl-pango/cogl-pango-render.c index 2e175d6a4..937bd00b8 100644 --- a/cogl/cogl-pango/cogl-pango-render.c +++ b/cogl/cogl-pango/cogl-pango-render.c @@ -286,11 +286,9 @@ cogl_pango_renderer_dispose (GObject *object) { CoglPangoRenderer *priv = COGL_PANGO_RENDERER (object); - if (priv->ctx) - { - cogl_object_unref (priv->ctx); - priv->ctx = NULL; - } + cogl_clear_object (&priv->ctx); + + G_OBJECT_CLASS (cogl_pango_renderer_parent_class)->dispose (object); } static void diff --git a/cogl/cogl/cogl-framebuffer.c b/cogl/cogl/cogl-framebuffer.c index 5e2026bc8..f0499f31a 100644 --- a/cogl/cogl/cogl-framebuffer.c +++ b/cogl/cogl/cogl-framebuffer.c @@ -356,6 +356,8 @@ cogl_framebuffer_dispose (GObject *object) ctx->current_read_buffer = NULL; g_clear_object (&priv->driver); + + G_OBJECT_CLASS (cogl_framebuffer_parent_class)->dispose (object); } static void