Kaydet (Commit) 6502c0dd authored tarafından Stephan Bergmann's avatar Stephan Bergmann

...and this looks like a memory leak, too

Change-Id: I5e203fe8b58d687c0c294c75e385f0bbc858ba07
üst f6d1a152
......@@ -20,6 +20,7 @@
#include <string.h>
#include <cassert>
#include <cstdarg>
#include <libxml/xmlwriter.h>
......@@ -452,7 +453,12 @@ const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich
// Will 'dontcare' or 'disabled' be overwritten with some real value?
if ( rItem.Which() && ( IsInvalidItem(*ppFnd) || !(*ppFnd)->Which() ) )
{
auto const old = *ppFnd;
*ppFnd = &m_pPool->Put( rItem, nWhich );
if (!IsInvalidItem(old)) {
assert(old->Which() == 0);
delete old;
}
return *ppFnd;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment