[gnome-panel] [libpanel-applet] Do not assume there was an existing gconf key
- From: Vincent Untz <vuntz src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-panel] [libpanel-applet] Do not assume there was an existing gconf key
- Date: Thu, 18 Jun 2009 05:40:07 -0400 (EDT)
commit 3778afca9732364361e48dc64305815a6ec7711e
Author: Philip Withnall <philip tecnocode co uk>
Date: Mon Jun 1 11:57:41 2009 +0100
[libpanel-applet] Do not assume there was an existing gconf key
When initially associating the schema, we were wrongly assuming that
there was already a gconf key in the user config for this schema. This
is obviously wrong the first time you add an applet.
This fixes a critical warning.
Closes: bgo#584374
libpanel-applet/panel-applet.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libpanel-applet/panel-applet.c b/libpanel-applet/panel-applet.c
index f88927e..6652ba8 100644
--- a/libpanel-applet/panel-applet.c
+++ b/libpanel-applet/panel-applet.c
@@ -161,7 +161,8 @@ panel_applet_associate_schemas_in_dir (GConfClient *client,
gconf_engine_associate_schema (client->engine,
key, schema_key, error);
- if (gconf_entry_get_value (applet_entry) == NULL ||
+ if (applet_entry == NULL ||
+ gconf_entry_get_value (applet_entry) == NULL ||
gconf_entry_get_is_default (applet_entry)) {
/* unset the key: gconf_client_get_entry()
* brought an invalid entry in the client
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]