diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-10-12 14:47:06 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-10-12 15:52:42 +0200 |
commit | d75f27fd738eeb2c7dc6d22f198d55d3a877aa0b (patch) | |
tree | d07e5027d7fc2534d10b562450e2346332204dff | |
parent | 1d76a3dfea5d842d99447e094a3c1c1f9249335b (diff) |
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 <vmiklos@collabora.com>
Tested-by: Jenkins
-rw-r--r-- | sw/qa/extras/ww8export/ww8export.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
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 |