Fixed possible bug in destructor, when parent folder is closed before destroying the message.

This commit is contained in:
Vincent Richard 2004-10-05 20:52:21 +00:00
parent 4661f3f6a3
commit a1f5ebbfbc

View File

@ -294,7 +294,9 @@ IMAPMessage::IMAPMessage(IMAPFolder* folder, const int num)
IMAPMessage::~IMAPMessage()
{
m_folder->unregisterMessage(this);
if (m_folder)
m_folder->unregisterMessage(this);
delete dynamic_cast <IMAPheader*>(m_header);
}