Kaydet (Commit) f1c47b9e authored tarafından Xisco Fauli's avatar Xisco Fauli Kaydeden (comit) Xisco Faulí

tdf#120750: Revert "tdf#96248 delete SfxPoolItems with Which Id >= 4000"

This reverts commit c9493b34.

According to
https://bugs.documentfoundation.org/show_bug.cgi?id=96248#c15
the asert was gone even before the patch...

Anyway, better to have an assert than a crash

Change-Id: I84389bf2e8e604f6967923c0eedaae3aec3455e6
Reviewed-on: https://gerrit.libreoffice.org/65115
Tested-by: Jenkins
Reviewed-by: 's avatarJochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: 's avatarXisco Faulí <xiscofauli@libreoffice.org>
(cherry picked from commit c5d0d424)
Reviewed-on: https://gerrit.libreoffice.org/65157
üst 70387560
...@@ -766,9 +766,16 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem ) ...@@ -766,9 +766,16 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem )
SfxPoolItem*& p = (*pItemArr)[nIdx]; SfxPoolItem*& p = (*pItemArr)[nIdx];
assert(p == &rItem); assert(p == &rItem);
assert(p->GetRefCount() && "removing Item without ref"); if ( p->GetRefCount() ) //!
ReleaseRef( *p );
else
{
assert(false && "removing Item without ref");
}
if (0 == ReleaseRef(*p)) // FIXME: Hack, for as long as we have problems with the Outliner
// See other MI-REF
if ( 0 == p->GetRefCount() && nWhich < 4000 )
{ {
DELETEZ(p); DELETEZ(p);
......
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