From kde-commits Wed Dec 26 12:59:28 2007 From: Roman Jarosz Date: Wed, 26 Dec 2007 12:59:28 +0000 To: kde-commits Subject: KDE/kdenetwork/kopete/protocols/msn Message-Id: <1198673968.162839.13315.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=119867397731348 SVN commit 753037 by rjarosz: Fix crash when someone adds you to contact list. I've added empty list check to remove assert (the functionality is the same as it was in Qt3). M +6 -3 msnaccount.cpp --- trunk/KDE/kdenetwork/kopete/protocols/msn/msnaccount.cpp #753036:753037 @@ -1235,10 +1235,13 @@ if(mc) { //if the contact has been added this way, it's because the other user added us. // don't forgot to set the reversed flag (Bug 114400) - MSNContact *c=dynamic_cast(mc->contacts().first()); - if(c && c->contactId() == handle ) + if ( !mc->contacts().isEmpty() ) { - c->setReversed( true ); + MSNContact *c=dynamic_cast(mc->contacts().first()); + if(c && c->contactId() == handle ) + { + c->setReversed( true ); + } } } }