diff --git a/src/backends/meta-backend.c b/src/backends/meta-backend.c index 0a8fb872e..aa256f56a 100644 --- a/src/backends/meta-backend.c +++ b/src/backends/meta-backend.c @@ -252,6 +252,13 @@ meta_backend_dispose (GObject *object) G_OBJECT_CLASS (meta_backend_parent_class)->dispose (object); } +static void +meta_backend_destroy (MetaBackend *backend) +{ + g_object_run_dispose (G_OBJECT (backend)); + g_object_unref (backend); +} + static void meta_backend_sync_screen_size (MetaBackend *backend) { @@ -1534,7 +1541,7 @@ meta_init_backend (GType backend_gtype, void meta_release_backend (void) { - g_clear_object (&_backend); + g_clear_pointer (&_backend, meta_backend_destroy); } void