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

List:       kmail-devel
Subject:    Possible bug in KMMainWidget::removeDuplicates()
From:       Marc Mutz <mutz () kde ! org>
Date:       2002-11-30 11:24:46
[Download RAW message or body]

[Attachment #2 (multipart/mixed)]


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

["kmmainwidget.cpp.diff" (text/x-diff)]

Index: kmmainwidget.cpp
===================================================================
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
--- 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
 //-----------------------------------------------------------------------------
 void KMMainWidget::removeDuplicates()
 {
+    if (!mFolder)
+       return;
     KMFolder *oFolder = mFolder;
     mHeaders->setFolder(0);
     QMap< QString, QValueList<int> > idMD5s;
     QValueList<int> redundantIds;
     QValueList<int>::Iterator kt;
-    if (!mFolder)
-       return;
     mFolder->open();
     for (int i = mFolder->count() - 1; i >= 0; --i) {
        QString id = (*mFolder)[i]->msgIdMD5();

[Attachment #6 (application/pgp-signature)]
_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail

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

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