From 24efb48fa52c6595c00b00edca55618f8b18b2a7 Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Wed, 13 May 2009 12:31:10 +0000 Subject: [PATCH] Merged revisions 964446 via svnmerge from svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise4/kdepim ................ r964446 | tmcguire | 2009-05-06 19:03:22 +0200 (Wed, 06 May 2009) | 11 lines Merged revisions 964441 via svnmerge from svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise/kdepim ........ r964441 | tmcguire | 2009-05-06 18:58:42 +0200 (Wed, 06 May 2009) | 4 lines Don't crash when we refresh the IMAP cache and a folder has been removed on the server in the meantime. kolab/issue2459 ........ ................ svn path=/trunk/KDE/kdepim/; revision=967418 --- kmacctcachedimap.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kmacctcachedimap.cpp b/kmacctcachedimap.cpp index ec21b8240..77a2a2ba2 100644 --- a/kmacctcachedimap.cpp +++ b/kmacctcachedimap.cpp @@ -210,7 +210,12 @@ void KMAcctCachedImap::processNewMail( bool /*interactive*/ ) else { KMFolder* f = mMailCheckFolders.front(); mMailCheckFolders.pop_front(); - processNewMail( static_cast( f->storage() ), false ); + + // Only check mail if the folder really exists, it might have been removed by the sync in + // the meantime. + if ( f ) { + processNewMail( static_cast( f->storage() ), false ); + } } }