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

CID#738972 use after free

Change-Id: I3c1329a55b53365945406c515ff4e8e72792dcb6
üst 5d4c63c8
......@@ -255,8 +255,11 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry)
pStyle->SetStyleName(A2OUSTR(""));
pFont = pFoundry->GetFontManger()->CreateOverrideFont(pCharStyle->GetFinalFontID(),m_pModifiers->FontID);
pStyle->SetFont(pFont);
m_StyleName = pXFStyleManager->AddStyle(pStyle)->GetStyleName();
}
IXFStyle *pNewStyle = pXFStyleManager->AddStyle(pStyle);
m_StyleName = pNewStyle->GetStyleName();
if (pNewStyle != pStyle)
pStyle = NULL;
}
else
m_StyleName = pNamedStyle->GetStyleName();
}
......@@ -267,7 +270,10 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry)
pStyle = new XFTextStyle();
pFont = pFoundry->GetFontManger()->CreateFont(m_pModifiers->FontID);
pStyle->SetFont(pFont);
m_StyleName = pXFStyleManager->AddStyle(pStyle)->GetStyleName();
IXFStyle *pNewStyle = pXFStyleManager->AddStyle(pStyle);
m_StyleName = pNewStyle->GetStyleName();
if (pNewStyle != pStyle)
pStyle = NULL;
}
}
......
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