Summary: | crash when deleting imap and creating pop account in one step | ||
---|---|---|---|
Product: | [Unmaintained] kmail | Reporter: | Willi Richert <w.richert> |
Component: | IMAP | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | crash | ||
Priority: | NOR | ||
Version: | 1.9.1 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Willi Richert
2006-11-13 21:25:43 UTC
SVN commit 645389 by wstephens: When deleting an account, there may be jobs live on that account that aren't automatically cleaned up. Make them safe in places where they lookup the account. BUG: 137302 M +30 -0 imapjob.cpp --- branches/KDE/3.5/kdepim/kmail/imapjob.cpp #645388:645389 @@ -502,6 +502,12 @@ void ImapJob::slotPutMessageDataReq( KIO::Job *job, QByteArray &data ) { KMAcctImap *account = static_cast<KMFolderImap*>(mDestFolder->storage())->account(); + if ( !account ) + { + emit finished(); + deleteLater(); + return; + } ImapAccountBase::JobIterator it = account->findJob( job ); if ( it == account->jobsEnd() ) return; @@ -522,6 +528,12 @@ void ImapJob::slotPutMessageResult( KIO::Job *job ) { KMAcctImap *account = static_cast<KMFolderImap*>(mDestFolder->storage())->account(); + if ( !account ) + { + emit finished(); + deleteLater(); + return; + } ImapAccountBase::JobIterator it = account->findJob( job ); if ( it == account->jobsEnd() ) return; bool deleteMe = false; @@ -562,6 +574,12 @@ { KMFolderImap * imapFolder = static_cast<KMFolderImap*>(mDestFolder->storage()); KMAcctImap *account = imapFolder->account(); + if ( !account ) + { + emit finished(); + deleteLater(); + return; + } ImapAccountBase::JobIterator it = account->findJob( job ); if ( it == account->jobsEnd() ) return; @@ -595,6 +613,12 @@ { KMFolderImap * imapFolder = static_cast<KMFolderImap*>(mDestFolder->storage()); KMAcctImap *account = imapFolder->account(); + if ( !account ) + { + emit finished(); + deleteLater(); + return; + } ImapAccountBase::JobIterator it = account->findJob( job ); if ( it == account->jobsEnd() ) return; @@ -613,6 +637,12 @@ void ImapJob::slotCopyMessageResult( KIO::Job *job ) { KMAcctImap *account = static_cast<KMFolderImap*>(mDestFolder->storage())->account(); + if ( !account ) + { + emit finished(); + deleteLater(); + return; + } ImapAccountBase::JobIterator it = account->findJob( job ); if ( it == account->jobsEnd() ) return; |