diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-12-08 18:57:32 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-12-09 07:16:34 +0000 |
commit | 4754afddc3030347ef49b401a9b798cea8fe523c (patch) | |
tree | a7505da2dae9b8eae70ed463309521c11780d4c4 /cui/source | |
parent | 6fd3f3caad1a559165dc9332249cbd0d84930775 (diff) |
Use unique_ptr out-arg to in SfxBindings::QueryState to avoid mem leaks
Change-Id: I35df02de675068478a36ef05266ffc2d3054b07f
Reviewed-on: https://gerrit.libreoffice.org/20477
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/tabpages/chardlg.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 9e47e2469dd1..ed1a26d09546 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1468,7 +1468,7 @@ void SvxCharEffectsPage::Initialize() m_pFontColorLB->SetUpdateMode( false ); { - SfxPoolItem* pDummy = nullptr; + std::unique_ptr<SfxPoolItem> pDummy; SfxViewFrame* pFrame = SfxViewFrame::GetFirst( pDocSh ); if ( !pFrame || SfxItemState::DEFAULT > pFrame->GetBindings().QueryState( SID_ATTR_AUTO_COLOR_INVALID, pDummy ) ) @@ -1477,7 +1477,6 @@ void SvxCharEffectsPage::Initialize() m_pOverlineColorLB->InsertAutomaticEntryColor( Color( COL_AUTO ) ); m_pFontColorLB->InsertAutomaticEntryColor( Color( COL_AUTO ) ); } - delete pDummy; } for ( long i = 0; i < pColorTable->Count(); i++ ) { |