From 58310c73aafa897d972d5c0c31305a2d85ac566f Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Sun, 15 Nov 2020 19:15:17 +0200 Subject: [PATCH] m-metadata: add callback for wp_object_activate() A callback is required, NULL is not accepted by GCClosure --- modules/module-metadata.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/module-metadata.c b/modules/module-metadata.c index 6203c149..3501c628 100644 --- a/modules/module-metadata.c +++ b/modules/module-metadata.c @@ -24,6 +24,16 @@ wp_metadata_plugin_init (WpMetadataPlugin * self) { } +static void +on_metadata_activated (GObject * obj, GAsyncResult * res, gpointer user_data) +{ + g_autoptr (GError) error = NULL; + if (!wp_object_activate_finish (WP_OBJECT (obj), res, &error)) { + wp_warning_object (user_data, "failed to activate WpImplMetadata: %s", + error->message); + } +} + static void wp_metadata_plugin_activate (WpPlugin * plugin) { @@ -33,7 +43,7 @@ wp_metadata_plugin_activate (WpPlugin * plugin) self->metadata = wp_impl_metadata_new (core); wp_object_activate (WP_OBJECT (self->metadata), - WP_OBJECT_FEATURES_ALL, NULL, NULL, self); + WP_OBJECT_FEATURES_ALL, NULL, on_metadata_activated, self); } static void