[Bug 22121] New: Make tp_channel_dispose idempotent

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sat Jun 6 14:22:36 CEST 2009


http://bugs.freedesktop.org/show_bug.cgi?id=22121

           Summary: Make tp_channel_dispose idempotent
           Product: Telepathy
           Version: unspecified
          Platform: Other
               URL: http://git.collabora.co.uk/?p=user/wjt/telepathy-
                    glib.git;a=shortlog;h=refs/heads/idempotent-dispose
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: telepathy-glib
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: will.thompson at collabora.co.uk


commit 0cb63c2aecbfb99e091fb4ebf07d85a56266110c
Author: Will Thompson <will.thompson at collabora.co.uk>
Date:   Sat Jun 6 13:18:35 2009 +0100

    Make tp_channel_dispose idempotent

diff --git a/telepathy-glib/channel.c b/telepathy-glib/channel.c
index 82224ed..e9750b3 100644
--- a/telepathy-glib/channel.c
+++ b/telepathy-glib/channel.c
@@ -1020,6 +1020,9 @@ tp_channel_dispose (GObject *object)

   DEBUG ("%p", self);

+  if (self->priv->connection == NULL)
+    goto finally;
+
   if (self->priv->conn_invalidated_id != 0)
     g_signal_handler_disconnect (self->priv->connection,
         self->priv->conn_invalidated_id);
@@ -1029,6 +1032,7 @@ tp_channel_dispose (GObject *object)
   g_object_unref (self->priv->connection);
   self->priv->connection = NULL;

+finally:
   ((GObjectClass *) tp_channel_parent_class)->dispose (object);
 }


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the telepathy-bugs mailing list