Kaydet (Commit) 480fb6ca authored tarafından Caolán McNamara's avatar Caolán McNamara

clear objects from duplicate ids early

Change-Id: I0caab9e329a465e10bf3ed321c55c287371bd437
üst d25035bc
...@@ -665,10 +665,15 @@ rtl::Reference<LwpObject> LwpObjectFactory::CreateObject(sal_uInt32 type, LwpObj ...@@ -665,10 +665,15 @@ rtl::Reference<LwpObject> LwpObjectFactory::CreateObject(sal_uInt32 type, LwpObj
break; break;
} }
} }
if(newObj.is()) if (newObj.is())
{ {
newObj->QuickRead(); 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; return newObj;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment