Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
bbcbbe4e03 |
@@ -243,8 +243,10 @@ static void dbus_name_owner_changed_callback(GDBusProxy *proxy, gchar *sender_na
|
||||
gchar *signal_name, GVariant *parameters,
|
||||
gpointer *data) {
|
||||
PlayerctlPlayerManager *manager = PLAYERCTL_PLAYER_MANAGER(data);
|
||||
g_object_ref(manager);
|
||||
|
||||
if (g_strcmp0(signal_name, "NameOwnerChanged") != 0) {
|
||||
g_object_unref(manager);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -252,6 +254,7 @@ static void dbus_name_owner_changed_callback(GDBusProxy *proxy, gchar *sender_na
|
||||
g_debug("Got unknown parameters on org.freedesktop.DBus "
|
||||
"NameOwnerChange signal: %s",
|
||||
g_variant_get_type_string(parameters));
|
||||
g_object_unref(manager);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -261,6 +264,7 @@ static void dbus_name_owner_changed_callback(GDBusProxy *proxy, gchar *sender_na
|
||||
|
||||
if (player_id == NULL) {
|
||||
g_variant_unref(name_variant);
|
||||
g_object_unref(manager);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -272,6 +276,7 @@ static void dbus_name_owner_changed_callback(GDBusProxy *proxy, gchar *sender_na
|
||||
} else {
|
||||
g_error("got unknown proxy in callback (this is a bug in playerctl)");
|
||||
g_variant_unref(name_variant);
|
||||
g_object_unref(manager);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -313,6 +318,7 @@ static void dbus_name_owner_changed_callback(GDBusProxy *proxy, gchar *sender_na
|
||||
g_variant_unref(name_variant);
|
||||
g_variant_unref(previous_owner_variant);
|
||||
g_variant_unref(new_owner_variant);
|
||||
g_object_unref(manager);
|
||||
}
|
||||
|
||||
static gboolean playerctl_player_manager_initable_init(GInitable *initable,
|
||||
|
Reference in New Issue
Block a user