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
wilder-work
Matt Rogers 19 years ago
parent 6043e40440
commit 7f2f3a99b8
  1. 2
      kmacctimap.cpp
  2. 2
      kmmainwidget.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;
}
}

@ -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*)));

Loading…
Cancel
Save