From e76ce986941f3f95b3d35b23b77a0434991975f4 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 29 Oct 2009 14:18:51 +0100 Subject: empathy-accounts-dialog: do_constructor: don't ref the dialog if it already exists (#600023) This breaks the concept of a constructor but the caller isn't supposed to unref it itself anyway (it's unreffed in accounts_dialog_destroy_cb). --- src/empathy-accounts-dialog.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c index 1aacaff68..5829ff8d0 100644 --- a/src/empathy-accounts-dialog.c +++ b/src/empathy-accounts-dialog.c @@ -1762,7 +1762,9 @@ do_constructor (GType type, if (dialog_singleton) { retval = G_OBJECT (dialog_singleton); - g_object_ref (retval); + /* We don't ref the object as the caller is not suppose to unref it. + * The dialog is unreffed in accounts_dialog_destroy_cb when the window + * has been destroyed. */ } else { -- cgit v1.2.3