[gnome-settings-daemon] media-keys: Fix crash when disabling plugin
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] media-keys: Fix crash when disabling plugin
- Date: Mon, 26 May 2014 12:28:00 +0000 (UTC)
commit 6a81d4ad4c2a48b3ed034a111d4eb0740b7af1a5
Author: Bastien Nocera <hadess hadess net>
Date: Mon May 26 14:26:17 2014 +0200
media-keys: Fix crash when disabling plugin
When the "active" plugin changes, or there are no keys captured yet,
exit out of gsettings_changed_cb().
plugins/media-keys/gsd-media-keys-manager.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/media-keys/gsd-media-keys-manager.c b/plugins/media-keys/gsd-media-keys-manager.c
index f237573..08c68d2 100644
--- a/plugins/media-keys/gsd-media-keys-manager.c
+++ b/plugins/media-keys/gsd-media-keys-manager.c
@@ -582,8 +582,14 @@ gsettings_changed_cb (GSettings *settings,
if (g_str_equal (settings_key, "max-screencast-length"))
return;
+ /* Handled by the core */
+ if (g_str_equal (settings_key, "active"))
+ return;
/* Find the key that was modified */
+ if (manager->priv->keys == NULL)
+ return;
+
for (i = 0; i < manager->priv->keys->len; i++) {
MediaKey *key;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]