fix the order of NULL check and access

svn path=/trunk/KDE/kdepim/; revision=534287
wilder-work
Stephan Kulow 20 years ago
parent ead3a4ea37
commit 8b94ba00b6
  1. 4
      kmacctcachedimap.cpp

@ -383,14 +383,14 @@ void KMAcctCachedImap::invalidateIMAPFolders( KMFolderCachedImap* folder )
//-----------------------------------------------------------------------------
void KMAcctCachedImap::addDeletedFolder( KMFolder* folder )
{
if ( folder->folderType() != KMFolderTypeCachedImap )
if ( !folder || folder->folderType() != KMFolderTypeCachedImap )
return;
KMFolderCachedImap* storage = static_cast<KMFolderCachedImap*>(folder->storage());
addDeletedFolder( storage->imapPath() );
kDebug(5006) << k_funcinfo << storage->imapPath() << endl;
// Add all child folders too
if( folder && folder->child() ) {
if( folder->child() ) {
QList<KMFolderNode*>::const_iterator it;
for ( it = folder->child()->constBegin();
it != folder->child()->constEnd();

Loading…
Cancel
Save