[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/kopete/kopete/contactlist
From: Roman Jarosz <kedgedev () gmail ! com>
Date: 2009-12-27 22:44:36
Message-ID: 1261953876.280609.29844.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1066794 by rjarosz:
Don't crash if we got new message for contact which isn't in contact list (e.g. \
private message in jabber group chat)
M +6 -5 contactlistplainmodel.cpp
M +6 -5 contactlisttreemodel.cpp
--- trunk/KDE/kdenetwork/kopete/kopete/contactlist/contactlistplainmodel.cpp \
#1066793:1066794 @@ -267,11 +267,12 @@
if (mc && mc != Kopete::ContactList::self()->myself())
{
int mcPos = m_contacts.indexOf( mc );
- Q_ASSERT( mcPos != -1 );
-
- QModelIndex mcIndex = index(mcPos, 0);
- if (mcIndex.isValid())
- indexList.append(mcIndex);
+ if ( mcPos != -1 )
+ {
+ QModelIndex mcIndex = index(mcPos, 0);
+ if (mcIndex.isValid())
+ indexList.append(mcIndex);
+ }
}
return indexList;
--- trunk/KDE/kdenetwork/kopete/kopete/contactlist/contactlisttreemodel.cpp \
#1066793:1066794 @@ -551,11 +551,12 @@
{
GroupMetaContactPair groupMetaContactPair( g, mc );
MetaContactModelItem* mcmi = m_metaContacts.value( groupMetaContactPair );
- Q_ASSERT( mcmi );
-
- QModelIndex mcIndex = indexFor( mcmi );
- if ( mcIndex.isValid() )
- indexList.append( mcIndex );
+ if ( mcmi )
+ {
+ QModelIndex mcIndex = indexFor( mcmi );
+ if ( mcIndex.isValid() )
+ indexList.append( mcIndex );
+ }
}
}
else if (!mc)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic