diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-12-15 08:48:14 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-12-15 08:48:14 +0100 |
commit | f6d1a15206ac13d3034c0c08722dea6102202354 (patch) | |
tree | ecef690170ba4e6da2013d08a075f853d193ae59 /svl | |
parent | 8102008ebd5ae8389ff227ba3b06de42316c8517 (diff) |
Memory leak
Change-Id: I99da487f0bed527eaacf47642884ae25fb0ae8b1
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/itemset.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index a0ad76fc7b8e..1ed7246ac47b 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -459,7 +459,9 @@ const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich // Turns into disabled? if( !rItem.Which() ) { - *ppFnd = rItem.Clone(m_pPool); + if (IsInvalidItem(*ppFnd) || (*ppFnd)->Which() != 0) { + *ppFnd = rItem.Clone(m_pPool); + } return nullptr; } else |