Kaydet (Commit) 217a2218 authored tarafından Caolán McNamara's avatar Caolán McNamara

valgrind, leak in SdStyleSheet

this is presumably a regression from

commit 8904bf48
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
üst 1de1b63c
......@@ -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);
......
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