aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-02-18 17:57:11 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-02-18 18:03:58 +0800
commitdf6a382a635251a6c86d81af128d4f1187491c5f (patch)
tree009f6e669bcd75262d9c09e63a8b757b586bf871
parent753a1862257d4c14fb2475a73ec08aeabdb7d907 (diff)
downloadgsoc2013-empathy-df6a382a635251a6c86d81af128d4f1187491c5f.tar
gsoc2013-empathy-df6a382a635251a6c86d81af128d4f1187491c5f.tar.gz
gsoc2013-empathy-df6a382a635251a6c86d81af128d4f1187491c5f.tar.bz2
gsoc2013-empathy-df6a382a635251a6c86d81af128d4f1187491c5f.tar.lz
gsoc2013-empathy-df6a382a635251a6c86d81af128d4f1187491c5f.tar.xz
gsoc2013-empathy-df6a382a635251a6c86d81af128d4f1187491c5f.tar.zst
gsoc2013-empathy-df6a382a635251a6c86d81af128d4f1187491c5f.zip
empathy_theme_manager_dup_singleton: act as a proper dup singleton function
-rw-r--r--libempathy-gtk/empathy-theme-manager.c7
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 **