diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2014-05-15 23:32:47 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2014-05-15 23:45:08 +0900 |
commit | e9c5f63f80ea54aea9963a6c268ed03881d7b734 (patch) | |
tree | 168c4188e0e3b59c63432eb37b49d3035c154f65 /sc/source/ui/dbgui/pvfundlg.cxx | |
parent | 73d4d9a5834bf5eb92c2643e30bec9d307d00175 (diff) |
Avoid possible memory leaks in case of exceptions
Change-Id: I7dc862794f7f0973bd4de7b54f7a1fb15235bc3e
Diffstat (limited to 'sc/source/ui/dbgui/pvfundlg.cxx')
-rw-r--r-- | sc/source/ui/dbgui/pvfundlg.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index 59cf31e53d47..7aca31e47956 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -39,6 +39,7 @@ #include "dputil.hxx" #include <vector> +#include <boost/scoped_ptr.hpp> using namespace ::com::sun::star::sheet; @@ -499,10 +500,9 @@ IMPL_LINK( ScDPSubtotalDlg, ClickHdl, PushButton*, pBtn ) { if (pBtn == mpBtnOptions) { - ScDPSubtotalOptDlg* pDlg = new ScDPSubtotalOptDlg( this, mrDPObj, maLabelData, mrDataFields, mbEnableLayout ); + boost::scoped_ptr<ScDPSubtotalOptDlg> pDlg(new ScDPSubtotalOptDlg( this, mrDPObj, maLabelData, mrDataFields, mbEnableLayout )); if( pDlg->Execute() == RET_OK ) pDlg->FillLabelData( maLabelData ); - delete pDlg; } return 0; } |