summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-10-19 09:45:07 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-10-19 09:22:52 +0000
commit0c34cd41c65973f8ff0e78c76cd6ad52ef89bc4a (patch)
treed4a93db6fce1a0c1b542fb187a80049c9f69aed8 /desktop
parentd6ff3d49df1fbe2731e4ba2076f4faa63ded9b11 (diff)
CppunitTest_desktop_lib: fix stack-use-after-return
The LOK callback objects registered are on-stack objects, so we must be sure that references no longer used after we return. Process idle events, so that desktop::CallbackHandler::flush() won't try to use the reference after return. Change-Id: I65d324cb9cef4fd1776d0f610d8d096717e0e833 Reviewed-on: https://gerrit.libreoffice.org/30034 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/qa/desktop_lib/test_desktop_lib.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index bcf019e548f2..d71df17790eb 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -1639,6 +1639,7 @@ void DesktopLOKTest::testPaintPartTile()
// the first view, so there were no invalidations.
CPPUNIT_ASSERT(aView1.m_bTilesInvalidated);
+ Scheduler::ProcessEventsToIdle();
mxComponent->dispose();
mxComponent.clear();
comphelper::LibreOfficeKit::setActive(false);
@@ -1678,6 +1679,7 @@ void DesktopLOKTest::testWriterCommentInsertCursor()
// inserted the comment.
CPPUNIT_ASSERT(aView1.m_aOwnCursor.IsEmpty());
+ Scheduler::ProcessEventsToIdle();
mxComponent->dispose();
mxComponent.clear();
comphelper::LibreOfficeKit::setActive(false);