diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-02-18 17:57:11 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-02-18 18:06:38 +0800 |
commit | ee4e14effcb1cb2b109d533c88933239c25a12c8 (patch) | |
tree | b0d9239841469fa0328588dbea57381bbd635359 /libempathy-gtk/empathy-theme-manager.c | |
parent | 7365b5426c1e281f49bd67506c09ce76ffb67e2c (diff) | |
download | gsoc2013-empathy-ee4e14effcb1cb2b109d533c88933239c25a12c8.tar gsoc2013-empathy-ee4e14effcb1cb2b109d533c88933239c25a12c8.tar.gz gsoc2013-empathy-ee4e14effcb1cb2b109d533c88933239c25a12c8.tar.bz2 gsoc2013-empathy-ee4e14effcb1cb2b109d533c88933239c25a12c8.tar.lz gsoc2013-empathy-ee4e14effcb1cb2b109d533c88933239c25a12c8.tar.xz gsoc2013-empathy-ee4e14effcb1cb2b109d533c88933239c25a12c8.tar.zst gsoc2013-empathy-ee4e14effcb1cb2b109d533c88933239c25a12c8.zip |
empathy_theme_manager_dup_singleton: act as a proper dup singleton function
Diffstat (limited to 'libempathy-gtk/empathy-theme-manager.c')
-rw-r--r-- | libempathy-gtk/empathy-theme-manager.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-theme-manager.c b/libempathy-gtk/empathy-theme-manager.c index a5438c6b3..1a4f5ae47 100644 --- a/libempathy-gtk/empathy-theme-manager.c +++ b/libempathy-gtk/empathy-theme-manager.c @@ -527,11 +527,14 @@ empathy_theme_manager_dup_singleton (void) { static EmpathyThemeManager *manager = NULL; - if (!manager) { + if (manager == NULL) { manager = g_object_new (EMPATHY_TYPE_THEME_MANAGER, NULL); + g_object_add_weak_pointer (G_OBJECT (manager), (gpointer *) &manager); + + return manager; } - return manager; + return g_object_ref (manager); } const gchar ** |