[Libreoffice-commits] core.git: linguistic/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Tue Apr 28 12:28:55 UTC 2020
linguistic/source/lngsvcmgr.cxx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 9ee7a841d41a5517fd567b17b936ea4c0141e157
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Apr 27 16:32:52 2020 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Tue Apr 28 14:28:19 2020 +0200
linguistic: make LngSvcMgr::GetAvailableGrammarSvcs_Impl() more readable
It's not exactly clear why, but as a side effect, this makes a crash in
uno::Reference::release() go away in the --enable-macosx-sandbox case.
But it helps readability as well, so why not.
The root cause is probabably either a compiler bug or the old code
depends on a longer lifetime of the temporaries involved in the function
call, but that's not clear to me.
Change-Id: I5f987129d3301d30ebf732757a4f1ba4bdbb8d52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93040
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 2cf8524f851f..16581700d890 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -1011,7 +1011,14 @@ void LngSvcMgr::GetAvailableGrammarSvcs_Impl()
{
try
{
- xSvc.set( ( xCompFactory.is() ? xCompFactory->createInstanceWithContext( xContext ) : xFactory->createInstance() ), uno::UNO_QUERY );
+ if (xCompFactory.is())
+ {
+ xSvc.set(xCompFactory->createInstanceWithContext(xContext), uno::UNO_QUERY);
+ }
+ else
+ {
+ xSvc.set(xFactory->createInstance(), uno::UNO_QUERY);
+ }
}
catch (const uno::Exception &)
{
More information about the Libreoffice-commits
mailing list