From 7f2f3a99b8b6b53694e3452b172bb025b35911c3 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Mon, 5 Nov 2007 01:06:02 +0000 Subject: [PATCH] Fix the crashes when viewing messages. The fix in kmacctimap.cpp is to prevent double incrementing which moves us past the end of the list, and then we dereference it, then crashing. The fix in kmmainwidget.cpp is to make sure that FolderJobs (and ergo, ImapJobs) always get an account to remove themselves from when it's time for them to die. (The account is referenced either through the destination folder or the source folder). svn path=/trunk/KDE/kdepim/; revision=732898 --- kmacctimap.cpp | 2 -- kmmainwidget.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/kmacctimap.cpp b/kmacctimap.cpp index 5e4a350ba..83cb438b3 100644 --- a/kmacctimap.cpp +++ b/kmacctimap.cpp @@ -201,7 +201,6 @@ void KMAcctImap::ignoreJobsForMessage( KMMessage* msg ) { job->kill(); } - ++it; } } @@ -216,7 +215,6 @@ void KMAcctImap::ignoreJobsForFolder( KMFolder* folder ) { job->kill(); } - ++it; } } diff --git a/kmmainwidget.cpp b/kmmainwidget.cpp index d8ae62223..423712b39 100644 --- a/kmmainwidget.cpp +++ b/kmmainwidget.cpp @@ -2169,7 +2169,7 @@ void KMMainWidget::slotMsgSelected(KMMessage *msg) disconnect( mJob, 0, mMsgView, 0 ); delete mJob; } - mJob = msg->parent()->createJob( msg, FolderJob::tGetMessage, 0, + mJob = msg->parent()->createJob( msg, FolderJob::tGetMessage, msg->parent(), "STRUCTURE", mMsgView->attachmentStrategy() ); connect(mJob, SIGNAL(messageRetrieved(KMMessage*)), mMsgView, SLOT(slotMessageArrived(KMMessage*)));