From 2032a747408a76454f721544e33eaf383ae3945c Mon Sep 17 00:00:00 2001 From: Tony Crisci Date: Wed, 13 Jun 2018 18:28:40 -0400 Subject: [PATCH] bugfix: dont unref a null player --- playerctl/playerctl-cli.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/playerctl/playerctl-cli.c b/playerctl/playerctl-cli.c index 3d5a089..60d0f40 100644 --- a/playerctl/playerctl-cli.c +++ b/playerctl/playerctl-cli.c @@ -424,7 +424,9 @@ int main (int argc, char *argv[]) } loopend: - g_object_unref(player); + if (player != NULL) { + g_object_unref(player); + } g_clear_error(&error); error = NULL;