trying to fix this crash: #0  0x4013ea80 in QGuardedPtrPrivate::object() const (this=0x0)     at /coolo/prod/qt-copy/include/qguardedptr.h:131 #1  0x4016b352 in QGuardedPtr<KMAcctImap>::operator KMAcctImap*() const (this=0x91627f8)     at /coolo/prod/qt-copy/include/qguardedptr.h:112 #2  0x4016afd4 in KMFolderImap::account() (this=0x91626c0)     at /coolo/prod/kdenetwork/kmail/kmfolderimap.h:103 #3  0x40245146 in KMImapJob::slotGetMessageResult(KIO::Job*) (this=0x8bf1ef0,     job=0x8adbc18) at /coolo/prod/kdenetwork/kmail/kmfolderimap.cpp:1163
trying to fix this crash:
#0  0x4013ea80 in QGuardedPtrPrivate::object() const (this=0x0)
    at /coolo/prod/qt-copy/include/qguardedptr.h:131
#1  0x4016b352 in QGuardedPtr<KMAcctImap>::operator KMAcctImap*() const (this=0x91627f8)
    at /coolo/prod/qt-copy/include/qguardedptr.h:112
#2  0x4016afd4 in KMFolderImap::account() (this=0x91626c0)
    at /coolo/prod/kdenetwork/kmail/kmfolderimap.h:103
#3  0x40245146 in KMImapJob::slotGetMessageResult(KIO::Job*) (this=0x8bf1ef0,
    job=0x8adbc18) at /coolo/prod/kdenetwork/kmail/kmfolderimap.cpp:1163

-  KMAcctImap *account = static_cast<KMFolderImap*>(mMsg->parent())->account();
+  KMMessage *msg = mMsgList.first();
+  KMFolderImap * folder = static_cast<KMFolderImap*>(msg->parent());
+  if (!folder) // guarded ptr - can be 0
+       return;
+  KMAcctImap *account = folder->account();

(there seems to be more places in the code where this construct is used though)
CCMAIL: kmail@kde.org

svn path=/trunk/kdenetwork/kmail/; revision=181228

lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi,lefou/kdepim-noakonadi