[gnome-settings-daemon/gnome-3-34] media-keys: Add guard to map_keybinding()
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-3-34] media-keys: Add guard to map_keybinding()
- Date: Sat, 16 Nov 2019 18:56:37 +0000 (UTC)
commit 6e26304b6afb9028d733e75d120d5b9b795e61a5
Author: Bastien Nocera <hadess hadess net>
Date: Sat Nov 16 11:44:55 2019 +0100
media-keys: Add guard to map_keybinding()
Just in case g_variant_get_strv() returns NULL when it really shouldn't.
plugins/media-keys/gsd-media-keys-manager.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index 60761fa4..0cb7c48c 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -3200,6 +3200,7 @@ map_keybinding (GVariant *variant, GVariant *old_default, GVariant *new_default)
const gchar *value;
defaults = g_variant_get_strv (new_default, NULL);
+ g_return_val_if_fail (defaults != NULL, NULL);
pos = defaults;
value = g_variant_get_string (variant, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]