Fixed possible bug in destructor, when parent folder is closed before destroying the message.
This commit is contained in:
parent
4661f3f6a3
commit
a1f5ebbfbc
@ -294,7 +294,9 @@ IMAPMessage::IMAPMessage(IMAPFolder* folder, const int num)
|
|||||||
|
|
||||||
IMAPMessage::~IMAPMessage()
|
IMAPMessage::~IMAPMessage()
|
||||||
{
|
{
|
||||||
m_folder->unregisterMessage(this);
|
if (m_folder)
|
||||||
|
m_folder->unregisterMessage(this);
|
||||||
|
|
||||||
delete dynamic_cast <IMAPheader*>(m_header);
|
delete dynamic_cast <IMAPheader*>(m_header);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user