sw/qa/extras/ww8export/ww8export.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
New commits: commit d75f27fd738eeb2c7dc6d22f198d55d3a877aa0b Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Wed Oct 12 14:47:06 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Wed Oct 12 15:52:42 2022 +0200 Fix apparently-dangling pointer After 001de7e21d29fccff904fe23de05afd68922fe2e, CppunitTest_sw_ww8export CPPUNIT_TEST_NAME=testTdf94386::TestBody started to fail with > svl/source/items/itemset.cxx:176:42: runtime error: member call on address 0x60400083cbd0 which does not point to an object of type 'SfxItemPool' > 0x60400083cbd0: note: object has invalid vptr > 00 00 00 00 b0 6e 02 00 00 00 00 00 00 00 00 00 be be be be 40 44 b1 05 e1 7f 00 00 00 00 00 00 > ^~~~~~~~~~~~~~~~~~~~~~~ > invalid vptr > #0 in SfxItemSet::~SfxItemSet() at svl/source/items/itemset.cxx:176:42 > #1 in testTdf94386::TestBody() at sw/qa/extras/ww8export/ww8export.cxx:1555:1 Change-Id: I6dff915866a4e7d1250b253e53061e5646aebf15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141253 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/sw/qa/extras/ww8export/ww8export.cxx b/sw/qa/extras/ww8export/ww8export.cxx index 22b71281d1f1..d7b86e0d0d14 100644 --- a/sw/qa/extras/ww8export/ww8export.cxx +++ b/sw/qa/extras/ww8export/ww8export.cxx @@ -1523,10 +1523,12 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf94386) // emulate the behavior from tdf#94386 - insert an envelope to the // document - SfxItemSet aSet(pWrtShell->GetView().GetCurShell()->GetPool(), svl::Items<FN_ENVELOP, FN_ENVELOP>); - aSet.Put(SwEnvItem()); - SfxRequest aRequest(FN_ENVELOP, SfxCallMode::SYNCHRON, aSet); - SW_MOD()->ExecOther(aRequest); + { + SfxItemSet aSet(pWrtShell->GetView().GetCurShell()->GetPool(), svl::Items<FN_ENVELOP, FN_ENVELOP>); + aSet.Put(SwEnvItem()); + SfxRequest aRequest(FN_ENVELOP, SfxCallMode::SYNCHRON, aSet); + SW_MOD()->ExecOther(aRequest); + } reload(mpFilter, "tdf94386.odt"); // check that the first and next page use different page styles