--- ./panel-plugin/pulseaudio-mpris-player.c-orig 2017-12-07 06:18:31.000000000 -0500 +++ ./panel-plugin/pulseaudio-mpris-player.c 2017-12-07 13:11:32.485541543 -0500 @@ -149,13 +149,23 @@ gchar **artists; + if (player->title != NULL) + { + g_free(player->title); + player->title = NULL; + } + + if (player->artist != NULL) + { + g_free(player->artist); + player->artist = NULL; + } + g_variant_iter_init (&iter, dictionary); while (g_variant_iter_loop (&iter, "{sv}", &key, &value)) { if (0 == g_ascii_strcasecmp (key, "xesam:title")) { - if (player->title != NULL) - g_free (player->title); player->title = g_strdup(g_variant_get_string(value, NULL)); } else if (0 == g_ascii_strcasecmp (key, "xesam:artist")) @@ -163,9 +173,6 @@ artists = g_variant_dup_strv (value, NULL); if (artists != NULL) { - if (player->artist != NULL) - g_free(player->artist); - if (g_strv_length (artists) > 0) { player->artist = g_strdup (artists[0]);