desktop/source/lib/init.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
New commits: commit cb1560d1c1c1fd17eaac64e10730842a472d1c82 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Mon Apr 22 17:17:05 2024 +0100 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Apr 22 18:48:28 2024 +0200 thesauri list can be empty at preload if none of the dictionaries are installed, seen in a bare bones docker image, giving a backtrace of: /usr/bin/coolforkit(_ZN7SigUtil13dumpBacktraceEv+0x73)[0x632d83] /usr/bin/coolforkit[0x6331a5] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12980)[0x7f48788b4980] /opt/collaboraoffice/program/libuno_sal.so.3(rtl_uString_assign+0xc)[0x7f487070582c] /opt/collaboraoffice/program/libmergedlo.so(+0x20f9478)[0x7f4873cbc478] /opt/collaboraoffice/program/libmergedlo.so(+0x20fa3c4)[0x7f4873cbd3c4] /opt/collaboraoffice/program/libmergedlo.so(+0x27e6d82)[0x7f48743a9d82] /opt/collaboraoffice/program/libmergedlo.so(+0x27e8eac)[0x7f48743abeac] /opt/collaboraoffice/program/libmergedlo.so(lok_preinit_2+0x1c)[0x7f48743ad31c] /usr/bin/coolforkit(_Z13globalPreinitRKSs+0x1e8)[0x5dfdd8] /usr/bin/coolforkit(_Z11forkit_mainiPPc+0x1582)[0x5aa482] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f48784d2c87] /usr/bin/coolforkit[0x56c392] Change-Id: Ib3a8ada7c22611e04e9db8dfa7cb0e227ece0f84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166467 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index cc909fa57c16..f0f6bb4a740e 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -7638,10 +7638,13 @@ static void preloadData() std::cerr << " "; std::cerr << "Preloading breakiterator: "; - css::uno::Reference< css::i18n::XBreakIterator > xBreakIterator = css::i18n::BreakIterator::create(xContext); - css::i18n::LineBreakUserOptions aUserOptions; - css::i18n::LineBreakHyphenationOptions aHyphOptions( LinguMgr::GetHyphenator(), css::uno::Sequence<beans::PropertyValue>(), 1 ); - xBreakIterator->getLineBreak("", /*nMaxBreakPos*/0, aLocales[0], /*nMinBreakPos*/0, aHyphOptions, aUserOptions); + if (aLocales.getLength()) + { + css::uno::Reference< css::i18n::XBreakIterator > xBreakIterator = css::i18n::BreakIterator::create(xContext); + css::i18n::LineBreakUserOptions aUserOptions; + css::i18n::LineBreakHyphenationOptions aHyphOptions( LinguMgr::GetHyphenator(), css::uno::Sequence<beans::PropertyValue>(), 1 ); + xBreakIterator->getLineBreak("", /*nMaxBreakPos*/0, aLocales[0], /*nMinBreakPos*/0, aHyphOptions, aUserOptions); + } css::uno::Reference< css::ui::XAcceleratorConfiguration > xGlobalCfg = css::ui::GlobalAcceleratorConfiguration::create( comphelper::getProcessComponentContext());