sw/qa/unit/sw-dialogs-test.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit 0581718d889a841afd5e4e23f6c61f273a081773 Author: Stephan Bergmann <sberg...@redhat.com> Date: Fri Nov 18 14:12:02 2016 +0100 Make sure swui's pSwResMgr is initialized in CppunitTest_sw_dialogs_test ...to avoid -fsanitize=null at > sw/source/uibase/dbui/dbtree.cxx:147:18: runtime error: reference binding to null pointer of type 'ResMgr' > #0 0x7fd408581b70 in SwDBTreeList::SwDBTreeList(vcl::Window*, long) sw/source/uibase/dbui/dbtree.cxx:147:18 > #1 0x7fd408594596 in VclPtr<SwDBTreeList> VclPtr<SwDBTreeList>::Create<VclPtr<vcl::Window>&, long&>(VclPtr<vcl::Window>&, long&) include/vcl/vclptr.hxx:138:46 > #2 0x7fd4085827d8 in makeSwDBTreeList sw/source/uibase/dbui/dbtree.cxx:156:1 > #3 0x7fd443044214 in VclBuilder::makeObject(vcl::Window*, rtl::OString const&, rtl::OString const&, std::__debug::map<rtl::OString, rtl::OString, std::less<rtl::OString>, std::allocator<std::pair<rtl::OString const, rtl::OString> > >&) vcl/source/window/builder.cxx:1793:17 Change-Id: I02c5a0017b85254bf34f622b55f7db9d5d546b80 diff --git a/sw/qa/unit/sw-dialogs-test.cxx b/sw/qa/unit/sw-dialogs-test.cxx index 74acd8c..1fb4f7b 100644 --- a/sw/qa/unit/sw-dialogs-test.cxx +++ b/sw/qa/unit/sw-dialogs-test.cxx @@ -26,6 +26,7 @@ extern "C" { using Fn = SwAbstractDialogFactory * (*)(); } class SwDialogsTest : public ScreenshotTest { private: + css::uno::Reference<css::lang::XComponent> component_; osl::Module libSwui_; /// helper method to populate KnownDialogs, called in setUp(). Needs to be @@ -61,6 +62,9 @@ SwDialogsTest::~SwDialogsTest() void SwDialogsTest::setUp() { ScreenshotTest::setUp(); + // Make sure the sw library's global pSwResMgr is initialized: + component_ = loadFromDesktop( + "private:factory/swriter", "com.sun.star.text.TextDocument"); // Make sure the swui library's global pSwResMgr is initialized // (alternatively to dynamically loading the library, SwCreateDialogFactory // could be declared in an include file and this CppunitTest link against _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits