Index: kmail/kmreaderwin.cpp
===================================================================
--- kmail/kmreaderwin.cpp	(wersja 831100)
+++ kmail/kmreaderwin.cpp	(kopia robocza)
@@ -481,7 +481,6 @@
     mSelectEncodingAction( 0 ),
     mToggleFixFontAction( 0 ),
     mHtmlWriter( 0 ),
-    mPartHtmlWriter( 0 ),
     mSavedRelativePosition( 0 ),
     mDecrytMessageOverwrite( false ),
     mShowSignatureDetails( false )
@@ -825,7 +824,6 @@
 KMReaderWin::~KMReaderWin()
 {
   delete mHtmlWriter; mHtmlWriter = 0;
-  mPartHtmlWriter = 0;
   delete mCSSHelper;
   if (mAutoDelete) delete message();
   delete mRootNode; mRootNode = 0;
Index: kmail/kmcommands.cpp
===================================================================
--- kmail/kmcommands.cpp	(wersja 831100)
+++ kmail/kmcommands.cpp	(kopia robocza)
@@ -1596,26 +1596,19 @@
 }
 
 
-// KMReaderWin object kept here after previous call of execute(); it is deleted 
-QPointer<KMReaderWin> s_printerWin;
-
 KMCommand::Result KMPrintCommand::execute()
 {
-  if ( s_printerWin && s_printerWin->htmlWriter() )
-    s_printerWin->htmlWriter()->reset(); // stop any previous processing
-  if ( !s_printerWin ) {
-    // the window will be deleted after printout is performed, in KMReaderWin::slotPrintMsg()
-    s_printerWin = new KMReaderWin( kmkernel->mainWin(), 0, 0 );
-  }
-  s_printerWin->setPrinting( true );
-  s_printerWin->readConfig();
-  s_printerWin->setHtmlOverride( mHtmlOverride );
-  s_printerWin->setHtmlLoadExtOverride( mHtmlLoadExtOverride );
-  s_printerWin->setUseFixedFont( mUseFixedFont );
-  s_printerWin->setOverrideEncoding( mEncoding );
-  s_printerWin->setPrintFont( mOverrideFont );
-  s_printerWin->setDecryptMessageOverwrite( true );
-  s_printerWin->printMsg( retrievedMessage() );
+  // the window will be deleted after printout is performed, in KMReaderWin::slotPrintMsg()
+  KMReaderWin *printerWin = new KMReaderWin( kmkernel->mainWin(), 0, 0 );
+  printerWin->setPrinting( true );
+  printerWin->readConfig();
+  printerWin->setHtmlOverride( mHtmlOverride );
+  printerWin->setHtmlLoadExtOverride( mHtmlLoadExtOverride );
+  printerWin->setUseFixedFont( mUseFixedFont );
+  printerWin->setOverrideEncoding( mEncoding );
+  printerWin->setPrintFont( mOverrideFont );
+  printerWin->setDecryptMessageOverwrite( true );
+  printerWin->printMsg( retrievedMessage() );
 
   return OK;
 }
Index: kmail/kmreaderwin.h
===================================================================
--- kmail/kmreaderwin.h	(wersja 831100)
+++ kmail/kmreaderwin.h	(kopia robocza)
@@ -527,9 +527,9 @@
   KToggleAction *mToggleFixFontAction;
   KUrl mUrlClicked;
   KMail::HtmlWriter * mHtmlWriter;
-  /** This pointer is kept only to be able to connect and disconnect signal 
+  /** Used only to be able to connect and disconnect finished() signal 
       in printMsg() and slotPrintMsg() since mHtmlWriter points only to abstract non-QObject class. */
-  KMail::KHtmlPartHtmlWriter * mPartHtmlWriter;
+  QPointer<KMail::KHtmlPartHtmlWriter> mPartHtmlWriter;
 
   // an attachment should be updated
   bool mAtmUpdate;
