intermediate fix to avoid the crash when KMail is about to exit

svn path=/trunk/KDE/kdepim/; revision=470726
wilder-work
Andreas Gungl 21 years ago
parent 07ceeaccef
commit 5be4562f71
  1. 10
      kmkernel.cpp

@ -1609,7 +1609,10 @@ void KMKernel::cleanup(void)
QStringList strList;
KMFolder *folder;
the_folderMgr->createFolderList(&strList, &folders);
for (int i = 0; folders.at(i) != folders.end(); i++)
#warning Port me!
// FIXME KMail crashes without the additional size() check bolow:
//for (int i = 0; folders.at(i) != folders.end(); i++)
for (int i = 0; i < folders.size() && folders.at(i) != folders.end(); i++)
{
folder = *folders.at(i);
if (!folder || folder->isDir()) continue;
@ -1618,7 +1621,10 @@ void KMKernel::cleanup(void)
strList.clear();
folders.clear();
the_searchFolderMgr->createFolderList(&strList, &folders);
for (int i = 0; folders.at(i) != folders.end(); i++)
#warning Port me!
// FIXME KMail crashes without the additional size() check bolow:
//for (int i = 0; folders.at(i) != folders.end(); i++)
for (int i = 0; i < folders.size() && folders.at(i) != folders.end(); i++)
{
folder = *folders.at(i);
if (!folder || folder->isDir()) continue;

Loading…
Cancel
Save