[gnome-settings-daemon] media-keys: Fix crash when keybindings change
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] media-keys: Fix crash when keybindings change
- Date: Wed, 16 Feb 2011 18:00:06 +0000 (UTC)
commit 89b4b516edfd5ec19f8987d63624c28fc2f30f8f
Author: Bastien Nocera <hadess hadess net>
Date: Wed Feb 16 16:26:45 2011 +0000
media-keys: Fix crash when keybindings change
We need to skip over hard-coded keys which don't have a
key name.
plugins/media-keys/gsd-media-keys-manager.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index 1c1b2cf..7d42f49 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -292,6 +292,9 @@ update_kbd_cb (GSettings *settings,
/* Find the key that was modified */
for (i = 0; i < HANDLED_KEYS; i++) {
+ /* Skip over hard-coded keys */
+ if (keys[i].settings_key == NULL)
+ continue;
if (strcmp (key, keys[i].settings_key) == 0) {
char *tmp;
Key *key;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]