summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2023-12-04 18:03:27 +0100
committerJulien Nabet <serval2412@yahoo.fr>2023-12-04 19:21:31 +0100
commitbc95ece0618b9886890d9c758b9d0ebc0fc41c69 (patch)
treea5e918591c4e8f82aab70c42032ff15b6ce609ad /editeng
parent22e1cdd3a2fc142fc5313e1dba942810c7e91f95 (diff)
cid#1546021 Using invalid iterator
and : cid#1545983 Using invalid iterator cid#1545969 Using invalid iterator cid#1545949 Using invalid iterator cid#1545929 Using invalid iterator cid#1545911 Using invalid iterator cid#1545910 Using invalid iterator cid#1545886 Using invalid iterator cid#1545870 Using invalid iterator cid#1545813 Using invalid iterator Change-Id: I2ad10c2a9affd348050a4abe0917a90927a52547 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160317 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/misc/svxacorr.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 8a28ccf42ada..6fdcbcca1ccf 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1750,7 +1750,11 @@ bool SvxAutoCorrect::AddWordStartException( const OUString& rNew,
if (iter != m_aLangTable.end())
pLists = &iter->second;
else if(CreateLanguageFile(aLangTagUndetermined))
- pLists = &m_aLangTable.find(aLangTagUndetermined)->second;
+ {
+ iter = m_aLangTable.find(aLangTagUndetermined);
+ assert(iter != m_aLangTable.end());
+ pLists = &iter->second;
+ }
}
OSL_ENSURE(pLists, "No auto correction file!");
return pLists && pLists->AddToWordStartExceptList(rNew);
@@ -2030,7 +2034,9 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList(
CreateLanguageFile(aLanguageTag, false))
{
//the language is available - so bring it on
- SvxAutoCorrectLanguageLists& rList = m_aLangTable.find(aLanguageTag)->second;
+ const auto iter = m_aLangTable.find(aLanguageTag);
+ assert(iter != m_aLangTable.end());
+ SvxAutoCorrectLanguageLists& rList = iter->second;
pRet = lcl_SearchWordsInList( &rList, rTxt, rStt, nEndPos );
if( pRet )
{