ofz#20051 if duplicate exists then m_ObjToRecMap points to deleted element
Change-Id: I854410ba1d5c0a622b5ba9c6816a24a3477e5089
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86686
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Tested-by: Jenkins
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index ca958de..4c5b907 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -5105,8 +5105,13 @@ SvxMSDffImportRec* SvxMSDffImportData::find(const SdrObject* pObj)
void SvxMSDffImportData::insert(std::unique_ptr<SvxMSDffImportRec> pImpRec)
{
m_ObjToRecMap[pImpRec->pObj] = pImpRec.get();
m_Records.insert(std::move(pImpRec));
auto aRet = m_Records.insert(std::move(pImpRec));
bool bSuccess = aRet.second;
if (bSuccess)
{
SvxMSDffImportRec* pRec = aRet.first->get();
m_ObjToRecMap[pRec->pObj] = pRec;
}
}
void SvxMSDffImportData::NotifyFreeObj(SdrObject* pObj)