diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-04-22 17:17:05 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-04-22 22:02:07 +0200 |
commit | 278828dce69d3fc143a81d7d40f9e9368f8e2c89 (patch) | |
tree | 4b57752326cb543fe114283c7fb834960d7c888f /desktop/source/lib/init.cxx | |
parent | c503b6eef32055f75dc9cf761bd20eda4f161dd4 (diff) |
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/+/166432
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/source/lib/init.cxx')
-rw-r--r-- | desktop/source/lib/init.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index c3afbf741a37..f13bc1f48e26 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -7585,10 +7585,13 @@ static void preloadData() std::cerr << "\n"; 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()); |