Hi Stephan, I changed this to make it compile but I /might/ have done it wrong, please have a look at what I did: void KMImapJob::slotGetMessageResult(KIO::Job * job) { =2D KMMessage *msg =3D mMsgList.first(); + if( !mMsg ) + return; + KMMessage *msg =3D mMsg; // was: mMsgList.first(); + // This did not compile since mMsgList + // is not a member of KMImapJob. KMFolderImap * folder =3D static_cast(msg->parent()); if (!folder) // guarded ptr - can be 0 return; Cheers Karl-Heinz On Monday 30 September 2002 11:24, Stephan Kulow wrote: > kdenetwork/kmail kmfolderimap.cpp,1.68,1.69 > Author: coolo > > > Modified Files: > kmfolderimap.cpp > Log Message: > trying to fix this crash: > #0 0x4013ea80 in QGuardedPtrPrivate::object() const (this=3D0x0) > at /coolo/prod/qt-copy/include/qguardedptr.h:131 > #1 0x4016b352 in QGuardedPtr::operator KMAcctImap*() const > (this=3D0x91627f8) at /coolo/prod/qt-copy/include/qguardedptr.h:112 > #2 0x4016afd4 in KMFolderImap::account() (this=3D0x91626c0) > at /coolo/prod/kdenetwork/kmail/kmfolderimap.h:103 > #3 0x40245146 in KMImapJob::slotGetMessageResult(KIO::Job*) > (this=3D0x8bf1ef0, job=3D0x8adbc18) at > /coolo/prod/kdenetwork/kmail/kmfolderimap.cpp:1163 > > - KMAcctImap *account =3D > static_cast(mMsg->parent())->account(); + KMMessage *msg = =3D > mMsgList.first(); > + KMFolderImap * folder =3D static_cast(msg->parent()); > + if (!folder) // guarded ptr - can be 0 > + return; > + KMAcctImap *account =3D folder->account(); > > (there seems to be more places in the code where this construct is used > though) CCMAIL: kmail@kde.org =2D-=20 Karl-Heinz Zimmer, Senior Software Engineer, Klar=E4lvdalens Datakonsult AB _______________________________________________ KMail Developers mailing list kmail@mail.kde.org http://mail.kde.org/mailman/listinfo/kmail