aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 **