summaryrefslogtreecommitdiffstats
path: root/kmail/kmreaderwin.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2019-05-15 15:05:06 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2019-05-15 15:05:06 +0900
commitf007b524fba622c4a33e0e3e1d657c7712f3e2a9 (patch)
tree868ac72394593a10820ee17eeedb5836de3fc5be /kmail/kmreaderwin.cpp
parent70cc9c74084dac5234b64facb8c0488574b1acac (diff)
downloadtdepim-f007b524fba622c4a33e0e3e1d657c7712f3e2a9.tar.gz
tdepim-f007b524fba622c4a33e0e3e1d657c7712f3e2a9.zip
Fixed crashed in kmail/kontact when trying to print a message.
The problem was introduced by #25. This resolves #27. Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kmail/kmreaderwin.cpp')
-rw-r--r--kmail/kmreaderwin.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/kmail/kmreaderwin.cpp b/kmail/kmreaderwin.cpp
index 76b25715d..927a5d59d 100644
--- a/kmail/kmreaderwin.cpp
+++ b/kmail/kmreaderwin.cpp
@@ -436,6 +436,7 @@ KMReaderWin::KMReaderWin(TQWidget *aParent,
mHeaderOnlyAttachmentsAction( 0 ),
mSelectEncodingAction( 0 ),
mToggleFixFontAction( 0 ),
+ mToggleMimePartTreeAction( 0 ),
mCanStartDrag( false ),
mHtmlWriter( 0 ),
mSavedRelativePosition( 0 ),
@@ -1461,7 +1462,8 @@ void KMReaderWin::showHideMimeTree( bool isPlainTextTopLevel ) {
saveSplitterSizes( reader );
mMimePartTree->hide();
}
- if ( mToggleMimePartTreeAction->isChecked() != mMimePartTree->isVisible() ) {
+ // mToggleMimePartTreeAction is null in case the reader win was created without an actionCollection
+ if ( mToggleMimePartTreeAction && mToggleMimePartTreeAction->isChecked() != mMimePartTree->isVisible() ) {
mToggleMimePartTreeAction->setChecked( mMimePartTree->isVisible() );
}
}