lotuswordpro/source/filter/lwpobjfactory.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
New commits: commit 08fbd42376de4a7ff438d4c8dea954dfb7b82e2a Author: Caolán McNamara <caol...@redhat.com> Date: Mon Dec 14 10:15:06 2015 +0000 clear objects from duplicate ids early Change-Id: I0caab9e329a465e10bf3ed321c55c287371bd437 (cherry picked from commit 480fb6ca369f5a347489414e9d314c802b1ee7aa) diff --git a/lotuswordpro/source/filter/lwpobjfactory.cxx b/lotuswordpro/source/filter/lwpobjfactory.cxx index 127770b..b1f94a1 100644 --- a/lotuswordpro/source/filter/lwpobjfactory.cxx +++ b/lotuswordpro/source/filter/lwpobjfactory.cxx @@ -665,10 +665,15 @@ rtl::Reference<LwpObject> LwpObjectFactory::CreateObject(sal_uInt32 type, LwpObj break; } } - if(newObj.is()) + if (newObj.is()) { newObj->QuickRead(); - m_IdToObjList.insert(LwpIdToObjMap::value_type(objHdr.GetID(), newObj)); + auto result = m_IdToObjList.insert(LwpIdToObjMap::value_type(objHdr.GetID(), newObj)); + if (!result.second) + { + SAL_WARN("lwp", "clearing duplicate object"); + newObj.clear(); + } } return newObj;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits