[Libreoffice-commits] core.git: sfx2/source

Stephan Bergmann sbergman at redhat.com
Wed Apr 9 08:52:06 PDT 2014


 sfx2/source/view/viewprn.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit b818619266e794ad5eadb7f859c3016b377f5bd3
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Apr 9 17:47:19 2014 +0200

    Do not leak SfxDialogExecutor_Impl
    
    Change-Id: Ife3e8e4b339b3e2cba3bc81e14f616d75c4f5ed0

diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx
index d5c846e..72555b1 100644
--- a/sfx2/source/view/viewprn.cxx
+++ b/sfx2/source/view/viewprn.cxx
@@ -631,7 +631,6 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
 {
     sal_uInt16              nDialogRet = RET_CANCEL;
     SfxPrinter*             pPrinter = 0;
-    SfxDialogExecutor_Impl* pExecutor = 0;
     bool                    bSilent = false;
 
     // does the function have been called by the user interface or by an API call
@@ -815,6 +814,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
 
                 // execute PrinterSetupDialog
                 PrinterSetupDialog* pPrintSetupDlg = new PrinterSetupDialog( GetWindow() );
+                SfxDialogExecutor_Impl* pExecutor = 0;
 
                 if (pImp->m_bHasPrintOptions && HasPrintOptionsPage())
                 {
@@ -841,6 +841,7 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq )
                 }
 
                 DELETEZ( pPrintSetupDlg );
+                delete pExecutor;
 
                 // no recording of PrinterSetup except printer name (is printer dependent)
                 rReq.Ignore();


More information about the Libreoffice-commits mailing list