[Xfce4-commits] <xfconf:master> Don't look for a singleton after creating the hash table.
Nick Schermer
noreply at xfce.org
Tue Feb 9 20:38:04 CET 2010
Updating branch refs/heads/master
to 630480595158390e6aec30de1575781a7120d096 (commit)
from de3cf31d468b834659ba5c07e8e9612b6f7f93f2 (commit)
commit 630480595158390e6aec30de1575781a7120d096
Author: Nick Schermer <nick at xfce.org>
Date: Tue Feb 9 20:04:34 2010 +0100
Don't look for a singleton after creating the hash table.
xfconf/xfconf-channel.c | 6 +++---
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,
More information about the Xfce4-commits
mailing list