This prevents the following crash:

- create new imap account
- kernel does cleanupImapFolders
- which creates the account folder and sets it to noContent
- it then closes the folder
- close in kmfoldermbox calls unlock
- that does assert(stream), there is no stream, because there is no content
- BOOM

svn path=/trunk/kdepim/; revision=240056
wilder-work
Till Adam 23 years ago
parent 1f0c866251
commit 4c8e552d14
  1. 13
      kmfoldermbox.cpp

@ -242,15 +242,16 @@ void KMFolderMbox::close(bool aForced)
writeConfig();
}
unlock();
mMsgList.clear(TRUE);
if (!noContent()) {
unlock();
mMsgList.clear(TRUE);
if (mStream) fclose(mStream);
if (mStream) fclose(mStream);
if (mIndexStream) {
fclose(mIndexStream);
updateIndexStreamPtr(TRUE);
fclose(mIndexStream);
updateIndexStreamPtr(TRUE);
}
}
mOpenCount = 0;
mStream = 0;
mIndexStream = 0;

Loading…
Cancel
Save