[empathy/gnome-2-28] empathy-accounts-dialog: do_constructor: don't ref the dialog if it already exists (#600023)



commit 120fc9120a2de2d0c3064d5aef10a62fe6993d35
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 a22704f..339b6c5 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -1747,7 +1747,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]