[telepathy-mission-control/master] McdDispatcher: don't allow startup locks to be released once dispose is called

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Sep 23 09:42:29 PDT 2009


If we haven't started to dispatch channels, and now we're
self-destructing, we certainly don't want to start dispatching channels
to whatever's left of our handlers (in practice, the channels would
probably be closed as undispatchable).
---
 src/mcd-dispatcher.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index bd1ac42..a165cf5 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -1743,6 +1743,12 @@ mcd_dispatcher_release_startup_lock (McdDispatcher *self)
     if (self->priv->startup_completed)
         return;
 
+    /* If we haven't started to dispatch channels, and now we're
+     * self-destructing, we certainly don't want to start dispatching channels
+     * to whatever's left of our handlers. */
+    if (self->priv->is_disposed)
+        return;
+
     DEBUG ("%p (decrementing from %" G_GSIZE_FORMAT ")",
            self, self->priv->startup_lock);
 
-- 
1.5.6.5




More information about the telepathy-commits mailing list