diff --git a/kmsystemtray.cpp b/kmsystemtray.cpp index e7d17ec15..6e37cf34f 100644 --- a/kmsystemtray.cpp +++ b/kmsystemtray.cpp @@ -482,10 +482,12 @@ void KMSystemTray::updateNewMessageNotification(KMFolder * fldr) void KMSystemTray::updateNewMessages() { - for ( QMap::Iterator it = mPendingUpdates.begin(); + for ( QMap, bool>::Iterator it = mPendingUpdates.begin(); it != mPendingUpdates.end(); ++it) { KMFolder *fldr = it.key(); + if ( !fldr ) // deleted folder + continue; /** The number of unread messages in that folder */ int unread = fldr->countUnread(); diff --git a/kmsystemtray.h b/kmsystemtray.h index bed91281a..cad384f1e 100644 --- a/kmsystemtray.h +++ b/kmsystemtray.h @@ -84,7 +84,7 @@ private: QPtrVector mPopupFolders; QMap, int> mFoldersWithUnread; - QMap mPendingUpdates; + QMap, bool> mPendingUpdates; QTimer *mUpdateTimer; time_t mLastUpdate; };