summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorAshod Nakashian <ashod.nakashian@collabora.co.uk>2018-11-11 16:54:59 -0500
committerMichael Meeks <michael.meeks@collabora.com>2019-10-02 19:46:45 +0200
commit66d6bed63c6be5feb8952e83296c41f219cd443f (patch)
tree3daa015bb04ce9a05cd179aee00a783027d72cf5 /sd
parente07492fd77e8a750b5b75a06f792bedaebf2ce77 (diff)
LOK: disable LOKit in unit-tests only after destroying all
When we disable LOKit at the end of a unit-test, we do so before any of the smart-pointers go out of scope. These instances are then destroyed when LOKit is no longer active, in spite of the fact that they were created while it was. This leaves some dialog/window routing notifiers dangling, which cause assertion failures and access-after-free (when they are invoked on destruction inadvertently). The latter issue was found with 'make CppunitTest_sd_tiledrendering VALGRIND=memcheck'. The fix is to move these flags to the setup and teardown stages of cpp-unit. Change-Id: I50bc240b96026880a2e278ea530b1e1810b8e28d Reviewed-on: https://gerrit.libreoffice.org/80028 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/80056 Tested-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/tiledrendering/tiledrendering.cxx1
1 files changed, 0 insertions, 1 deletions
diff --git a/sd/qa/unit/tiledrendering/tiledrendering.cxx b/sd/qa/unit/tiledrendering/tiledrendering.cxx
index 6a3837897bbb..0822d2b047e0 100644
--- a/sd/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sd/qa/unit/tiledrendering/tiledrendering.cxx
@@ -2186,7 +2186,6 @@ void SdTiledRenderingTest::testCutSelectionChange()
void SdTiledRenderingTest::testInsertDeletePageInvalidation()
{
// Load the document.
- comphelper::LibreOfficeKit::setActive();
SdXImpressDocument* pXImpressDocument = createDoc("dummy.odp");
ViewCallback aView1;
SfxViewShell::Current()->registerLibreOfficeKitViewCallback(&ViewCallback::callback, &aView1);