summaryrefslogtreecommitdiff
path: root/xfconf/xfconf-channel.c
diff options
context:
space:
mode:
authorNick Schermer <nick@xfce.org>2010-02-09 20:04:34 +0100
committerNick Schermer <nick@xfce.org>2010-02-09 20:23:47 +0100
commit630480595158390e6aec30de1575781a7120d096 (patch)
tree6c153f9908c4066ba964d8048bb54009271a36a8 /xfconf/xfconf-channel.c
parentde3cf31d468b834659ba5c07e8e9612b6f7f93f2 (diff)
downloadxfconf-630480595158390e6aec30de1575781a7120d096.tar.gz
Don't look for a singleton after creating the hash table.
Diffstat (limited to 'xfconf/xfconf-channel.c')
-rw-r--r--xfconf/xfconf-channel.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfconf/xfconf-channel.c b/xfconf/xfconf-channel.c
index 9ac2d94..be214a9 100644
--- a/xfconf/xfconf-channel.c
+++ b/xfconf/xfconf-channel.c
@@ -217,7 +217,7 @@ xfconf_channel_constructor(GType type,
const gchar *channel_name = NULL;
gboolean is_singleton = IS_SINGLETON_DEFAULT;
guint i;
- XfconfChannel *channel;
+ XfconfChannel *channel = NULL;
for(i = 0; i < n_construct_properties; ++i) {
if(!strcmp(g_param_spec_get_name(construct_properties[i].pspec), "channel-name"))
@@ -238,9 +238,9 @@ xfconf_channel_constructor(GType type,
__channel_singletons = g_hash_table_new_full(g_str_hash, g_str_equal,
(GDestroyNotify)g_free,
(GDestroyNotify)g_object_unref);
- }
+ } else
+ channel = g_hash_table_lookup(__channel_singletons, channel_name);
- channel = g_hash_table_lookup(__channel_singletons, channel_name);
if(!channel) {
channel = XFCONF_CHANNEL(G_OBJECT_CLASS(xfconf_channel_parent_class)->constructor(type,
n_construct_properties,