From 33df540200e79a49859cf26fc393a8944d2cf204 Mon Sep 17 00:00:00 2001 From: haruInDisguise Date: Wed, 26 Mar 2025 20:45:29 +0100 Subject: [PATCH] module_mpris: Fixed bus name handeling The 'HandleNameChanged' event will no longer attempt to change the name of non MPRIS clients. --- modules/mpris.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/mpris.c b/modules/mpris.c index ecac04b..574c53a 100644 --- a/modules/mpris.c +++ b/modules/mpris.c @@ -538,6 +538,9 @@ context_event_handle_name_owner_changed(sd_bus_message *message, struct context assert(!is_empty_string(old_owner)); struct client *client = client_lookup_by_unique_name(context, old_owner); + if (client == NULL) + return; + LOG_DBG("'NameOwnerChanged': Name changed from '%s' to '%s' for client '%s'", old_owner, new_owner, client->bus_name); client_change_unique_name(client, new_owner);