summaryrefslogtreecommitdiff
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
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>
-rw-r--r--editeng/source/misc/svxacorr.cxx4
-rw-r--r--sd/source/filter/eppt/pptx-epptooxml.cxx6
2 files changed, 8 insertions, 2 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;
}
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index ae8ccc063cf2..291565871ff2 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -2335,9 +2335,13 @@ void PowerPointExport::WritePlaceholderReferenceShapes(PowerPointShapeExport& rD
|| mXPagePropSet->getPropertyValue("IsDateTimeFixed") == false)))
{
if ((xShape = GetReferencedPlaceholderXShape(DateAndTime, ePageType)))
+ {
+ const auto iter = maPlaceholderShapeToIndexMap.find(xShape);
+ assert(iter != maPlaceholderShapeToIndexMap.end());
rDML.WritePlaceholderReferenceShape(DateAndTime,
- maPlaceholderShapeToIndexMap.find(xShape)->second,
+ iter->second,
ePageType, mXPagePropSet);
+ }
}
}