[gnome-settings-daemon/wip/hadess/remove-media-keys-dbus: 2/4] media-keys: Add guard to MPRIS controller code
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/wip/hadess/remove-media-keys-dbus: 2/4] media-keys: Add guard to MPRIS controller code
- Date: Mon, 18 Oct 2021 13:17:33 +0000 (UTC)
commit 3438be1e7e30c3969580ce99c97b3bd32fb10f30
Author: Bastien Nocera <hadess hadess net>
Date: Mon Oct 18 15:07:01 2021 +0200
media-keys: Add guard to MPRIS controller code
plugins/media-keys/mpris-controller.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/plugins/media-keys/mpris-controller.c b/plugins/media-keys/mpris-controller.c
index c70f0bc1..4fcbbf04 100644
--- a/plugins/media-keys/mpris-controller.c
+++ b/plugins/media-keys/mpris-controller.c
@@ -77,6 +77,9 @@ mpris_proxy_call_done (GObject *object,
gboolean
mpris_controller_key (MprisController *self, const gchar *key)
{
+ g_return_val_if_fail (MPRIS_IS_CONTROLLER (self), FALSE);
+ g_return_val_if_fail (key != NULL, FALSE);
+
if (!self->mpris_client_proxy)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]