[empathy] empathy-accounts-dialog: do_constructor: don't ref the dialog if it already exists (#600023)
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [empathy] empathy-accounts-dialog: do_constructor: don't ref the dialog if it already exists (#600023)
- Date: Thu, 29 Oct 2009 13:31:06 +0000 (UTC)
commit e76ce986941f3f95b3d35b23b77a0434991975f4
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Thu Oct 29 14:18:51 2009 +0100
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 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 1aacaff..5829ff8 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
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]