CVS commit by burghard: Do not crash (and change indentation so that it matches the rest of the file) M +22 -17 kmacctimap.cpp 1.197 --- kdepim/kmail/kmacctimap.cpp #1.196:1.197 @@ -412,4 +412,9 @@ void KMAcctImap::postProcessNewMail( KMF // It's possible that the message has been deleted or moved into a // different folder, or that the serNum is stale + if ( !folder ) { + mFilterSerNumsToSave.remove( QString( "%1" ).arg( *filterIt ) ); + ++filterIt; + continue; + } KMFolderImap *imapFolder = static_cast(folder->storage()); @@ -421,5 +426,5 @@ void KMAcctImap::postProcessNewMail( KMF } - if (folder && (idx != -1)) { + if (idx != -1) { msg = folder->getMsg( idx );