[Telepathy-commits] [telepathy-qt4/master] Fix crash after removing an account. Added a workaround that will be removed if ContactManager::slotMembersChanged()

Stefan Eilers stefan.eilers at basyskom.de
Mon Feb 2 09:19:41 PST 2009


---
 TelepathyQt4/Prototype/ContactManager.cpp |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/TelepathyQt4/Prototype/ContactManager.cpp b/TelepathyQt4/Prototype/ContactManager.cpp
index 7114375..b2238ed 100644
--- a/TelepathyQt4/Prototype/ContactManager.cpp
+++ b/TelepathyQt4/Prototype/ContactManager.cpp
@@ -717,6 +717,7 @@ void ContactManager::slotMembersChanged(const QString& message,
                                         const Telepathy::UIntList& remote_pending,
                                         uint actor, uint reason)
 {
+    static bool is_already_in = false; // FIXME: Remove this until RTCHM-329 
     Q_UNUSED(actor);
     Q_UNUSED(reason);
 
@@ -1053,6 +1054,14 @@ void ContactManager::slotMembersChanged(const QString& message,
     
     if (members_removed.size()!=0)
     {
+        // FIXME: Remove this until RTCHM-329 
+        if (is_already_in)
+        {
+            qDebug() << "Reentrance detected.."; 
+            return; 
+        }     
+        is_already_in = true;
+        
 #ifdef ENABLE_DEBUG_OUTPUT_
         qDebug() << "SlotMembers Changed Removed Called";
 #endif
@@ -1122,6 +1131,7 @@ void ContactManager::slotMembersChanged(const QString& message,
                 }
             }
         }
+        is_already_in = false; // FIXME: Remove this until RTCHM-329 
     }
     emit signalMembersChanged( this,
                                message,
-- 
1.5.6.5



More information about the Telepathy-commits mailing list