diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-09-18 14:40:24 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-10-17 23:22:18 +0200 |
commit | 778b4d0182768584f83bf83b3804e465bf35bbd2 (patch) | |
tree | d134a6a471a0db869b45e3086b881a68f0bf8231 /sd/source | |
parent | ef515a285921edc4df7abd358bf840a0a4e40cf6 (diff) |
valgrind, leak in SdStyleSheet
this is presumably a regression from
commit 8904bf48e0cb4d5d0890684ce82dc2ff3252e41f
Author: Michael Stahl <mstahl@redhat.com>
Date: Tue Jul 7 23:57:07 2015 +0200
sd: dispose SdStyleSheet properly
If it's disposed during document destruction it still retained pointers
to SfxItemSet and SfxStyleSheetBasePool.
where it was always deleted in the dtor, but now
is optional in ::dispose
lets set bMySet to true when pSet is created like sc does, rather
try going to an unconditional delete in ::dispose
Change-Id: I214675805e513f657e51c779758106194f6d14e3
(cherry picked from commit 217a22188274221035aec988eccea5e5c9768921)
Reviewed-on: https://gerrit.libreoffice.org/18694
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
(cherry picked from commit 31d1004f00624a1d755914ad8313992abb9545a9)
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/core/stlsheet.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index a9f6f27187cc..0295790fb028 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -245,6 +245,7 @@ SfxItemSet& SdStyleSheet::GetItemSet() 0, 0 }; pSet = new SfxItemSet(GetPool().GetPool(), nWhichPairTable); + bMySet = true; } return *pSet; @@ -270,6 +271,7 @@ SfxItemSet& SdStyleSheet::GetItemSet() 0, 0 }; pSet = new SfxItemSet(GetPool().GetPool(), nWhichPairTable); + bMySet = true; } return *pSet; @@ -309,6 +311,7 @@ SfxItemSet& SdStyleSheet::GetItemSet() 0, 0 }; pSet = new SfxItemSet(GetPool().GetPool(), nWhichPairTable); + bMySet = true; } return(*pSet); |