From 982efcdb8be0f3a591a8bd59c3e260eab4aec4c8 Mon Sep 17 00:00:00 2001 From: Aron Budea Date: Sat, 17 Dec 2022 13:16:21 +0100 Subject: [PATCH] LanguageTool: don't crash if REST protocol isn't set Change-Id: I91ea4cc8823aae617bb00fdaeca8d4c10b1f5fc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144376 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar --- desktop/source/lib/init.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index f398e23d91b7..3f18763818fa 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -7011,7 +7011,7 @@ void setLanguageToolConfig() if (aEnabled != "true") return; OUString aBaseUrl = OStringToOUString(pBaseUrlString, RTL_TEXTENCODING_UTF8); - OUString aRestProtocol = OStringToOUString(pRestProtocol, RTL_TEXTENCODING_UTF8); + OUString aRestProtocol = pRestProtocol ? OStringToOUString(pRestProtocol, RTL_TEXTENCODING_UTF8) : ""; try { SvxLanguageToolOptions& rLanguageOpts = SvxLanguageToolOptions::Get(); -- 2.11.4.GIT