Fix crash in systray notification when folders are deleted. (#89520)

svn path=/trunk/kdepim/; revision=347173
wilder-work
David Faure 22 years ago
parent c3f42fb849
commit 85522e4281
  1. 4
      kmsystemtray.cpp
  2. 2
      kmsystemtray.h

@ -482,10 +482,12 @@ void KMSystemTray::updateNewMessageNotification(KMFolder * fldr)
void KMSystemTray::updateNewMessages()
{
for ( QMap<KMFolder*, bool>::Iterator it = mPendingUpdates.begin();
for ( QMap<QGuardedPtr<KMFolder>, 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();

@ -84,7 +84,7 @@ private:
QPtrVector<KMFolder> mPopupFolders;
QMap<QGuardedPtr<KMFolder>, int> mFoldersWithUnread;
QMap<KMFolder*, bool> mPendingUpdates;
QMap<QGuardedPtr<KMFolder>, bool> mPendingUpdates;
QTimer *mUpdateTimer;
time_t mLastUpdate;
};

Loading…
Cancel
Save