diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2018-12-13 17:10:29 +0100 |
---|---|---|
committer | Xisco Faulí <xiscofauli@libreoffice.org> | 2018-12-14 16:40:03 +0100 |
commit | f1c47b9ea954342ecffc440784b43cc8cfd99f91 (patch) | |
tree | b4d771a224d6c19794c4c3719ebe2d3ad4de222d /svl | |
parent | 7038756003818f9c98866fa30316950172281043 (diff) |
tdf#120750: Revert "tdf#96248 delete SfxPoolItems with Which Id >= 4000"
This reverts commit c9493b344a9bd104d0a882f5e9407880c0c63c20.
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: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
(cherry picked from commit c5d0d424bd7e78455cb6f9578cf2425ac0787004)
Reviewed-on: https://gerrit.libreoffice.org/65157
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/itempool.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index df18182c768c..31eb9386c18f 100644 --- a/svl/source/items/itempool.cxx +++ b/svl/source/items/itempool.cxx @@ -766,9 +766,16 @@ void SfxItemPool::Remove( const SfxPoolItem& rItem ) SfxPoolItem*& p = (*pItemArr)[nIdx]; 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); |