From kmail-devel Sat Nov 30 11:24:46 2002 From: Marc Mutz Date: Sat, 30 Nov 2002 11:24:46 +0000 To: kmail-devel Subject: Possible bug in KMMainWidget::removeDuplicates() X-MARC-Message: https://marc.info/?l=kmail-devel&m=103865568407197 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-03=_bAK69GaxEtA4rtN" --Boundary-03=_bAK69GaxEtA4rtN Content-Type: multipart/mixed; boundary="Boundary-01=_//J69KUXy4RG971" Content-Transfer-Encoding: 7bit Content-Description: signed data Content-Disposition: inline --Boundary-01=_//J69KUXy4RG971 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Description: body text Content-Disposition: inline Hi! Attached micro-patch fixes what I think is a bug in removeDuplicates(). It moves the !mFolder guard clause to _before_ the mHeaders->setFolder(0). Marc -- You can fool some people sometimes But you can't fool all the people all the time -- Bob Marley --Boundary-01=_//J69KUXy4RG971 Content-Type: text/x-diff; charset="us-ascii"; name="kmmainwidget.cpp.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="kmmainwidget.cpp.diff" Index: kmmainwidget.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /home/kde/kdenetwork/kmail/Attic/kmmainwidget.cpp,v retrieving revision 1.1.2.52 diff -u -3 -p -r1.1.2.52 kmmainwidget.cpp =2D-- kmmainwidget.cpp 2002/11/30 11:11:45 1.1.2.52 +++ kmmainwidget.cpp 2002/11/30 11:24:14 @@ -2745,13 +2745,13 @@ void KMMainWidget::slotChangeCaption(QLi //------------------------------------------------------------------------= =2D---- void KMMainWidget::removeDuplicates() { + if (!mFolder) + return; KMFolder *oFolder =3D mFolder; mHeaders->setFolder(0); QMap< QString, QValueList > idMD5s; QValueList redundantIds; QValueList::Iterator kt; =2D if (!mFolder) =2D return; mFolder->open(); for (int i =3D mFolder->count() - 1; i >=3D 0; --i) { QString id =3D (*mFolder)[i]->msgIdMD5(); --Boundary-01=_//J69KUXy4RG971-- --Boundary-03=_bAK69GaxEtA4rtN Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQA96KAb3oWD+L2/6DgRAmvXAJ92oJSe+zwJ/1J+N6LzG2n3INWmjwCgzpEQ YkL1C5w+V3qxD67YR9SFFuk= =aHXv -----END PGP SIGNATURE----- --Boundary-03=_bAK69GaxEtA4rtN-- _______________________________________________ KMail Developers mailing list kmail@mail.kde.org http://mail.kde.org/mailman/listinfo/kmail