[Telepathy-commits] [telepathy-qt4/master] When a Channel's owning Connection is destroyed, cut off the dangling pointer

Olli Salli olli.salli at collabora.co.uk
Mon Nov 3 07:33:23 PST 2008


---
 TelepathyQt4/cli-channel.cpp |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/TelepathyQt4/cli-channel.cpp b/TelepathyQt4/cli-channel.cpp
index cf22e6c..b836059 100644
--- a/TelepathyQt4/cli-channel.cpp
+++ b/TelepathyQt4/cli-channel.cpp
@@ -636,6 +636,8 @@ void Channel::onConnectionReadinessChanged(uint readiness)
 
 void Channel::onConnectionDestroyed()
 {
+    debug() << "Owning connection destroyed, cutting off dangling pointer";
+    mPriv->connection = 0;
     return onConnectionReadinessChanged(Connection::ReadinessDead);
 }
 
-- 
1.5.6.5



More information about the Telepathy-commits mailing list