[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdenetwork/kopete/protocols/msn
From:       Olivier Goffart <ogoffart () kde ! org>
Date:       2005-01-30 22:23:43
Message-ID: 20050130222343.08DED1BA04 () office ! kde ! org
[Download RAW message or body]

CVS commit by ogoffart: 

Fix possible crash


  M +11 -13    msnaccount.cpp   1.106


--- kdenetwork/kopete/protocols/msn/msnaccount.cpp  #1.105:1.106
@@ -681,4 +681,11 @@ void MSNAccount::slotKopeteGroupRenamed(
 void MSNAccount::slotKopeteGroupRemoved( Kopete::Group *g )
 {
+        //The old gorup list is only used whe syncing the contactlist.
+        //We can assume the contactlist is already fully synced at this time.
+        //The group g is maybe in the oldGroupList.  We remove everithing since
+        //we don't need it anymore, no need to search it
+        m_oldGroupList.clear();
+
+        
         if ( !g->pluginData( protocol(), accountId() + " id" ).isEmpty() )
         {
@@ -691,4 +698,8 @@ void MSNAccount::slotKopeteGroupRemoved(
                 }
 
+                //this is also done later, but he have to do it now!
+                // (in slotGroupRemoved)
+                m_groupList.remove(groupNumber);
+
                 if ( groupNumber == 0 )
                 {
@@ -725,17 +736,4 @@ void MSNAccount::slotKopeteGroupRemoved(
                                 m_notifySocket->removeGroup( groupNumber );
                 }
-                //this is also done later, but he have to do it now!
-                // (in slotGroupRemoved)
-                m_groupList.remove(groupNumber);
-        }
-
-        //remove it from the old list
-        for(QMap<unsigned int, Kopete::Group*>::Iterator it=m_oldGroupList.begin() ; \
                it != m_oldGroupList.end() ; ++it )
-        {
-                if(g==it.data())
-                {
-                        m_oldGroupList.remove(it);
-                        break;
-                }
         }
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic