summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kmail/kmreaderwin.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/kmail/kmreaderwin.cpp b/kmail/kmreaderwin.cpp
index 6c5acd10c..b3c435703 100644
--- a/kmail/kmreaderwin.cpp
+++ b/kmail/kmreaderwin.cpp
@@ -780,6 +780,9 @@ void KMReaderWin::slotCycleAttachmentStrategy() {
//-----------------------------------------------------------------------------
KMReaderWin::~KMReaderWin()
{
+ if (message()) {
+ message()->detach( this );
+ }
clearBodyPartMementos();
delete mHtmlWriter; mHtmlWriter = 0;
delete mCSSHelper;