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>
pull/29/head
Michele Calgaro 6 years ago
parent 70cc9c7408
commit f007b524fb
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -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() );
}
}

Loading…
Cancel
Save