summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-12-05 12:45:43 +0000
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-12-05 17:18:57 +0100
commita28a721ef9f2daced3e08f30578e603abd119773 (patch)
treeed7ddceb3a8b02d2a602e4b25b40c4f42ee8c688 /editeng
parent23c300a06dbfb5399cf479d603e6f7fe1433d134 (diff)
cid#1546503 Using invalid iterator
and cid#1546284 Using invalid iterator Change-Id: I9ff3498b65ce392dbe859566b49e60a31e0779f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160370 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/misc/svxacorr.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 15cbecc32db3..2788c6694c09 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -2146,7 +2146,9 @@ bool SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang,
if (m_aLangTable.find(aLanguageTag) != m_aLangTable.end() || CreateLanguageFile(aLanguageTag, false))
{
//the language is available - so bring it on
- const SvStringsISortDtor* pList = m_aLangTable.find(aLanguageTag)->second.GetCplSttExceptList();
+ const auto iter = m_aLangTable.find(aLanguageTag);
+ assert(iter != m_aLangTable.end() && "CreateLanguageFile can't fail");
+ const SvStringsISortDtor* pList = iter->second.GetCplSttExceptList();
if(bAbbreviation ? lcl_FindAbbreviation(pList, sWord) : pList->find(sWord) != pList->end() )
return true;
}