tweak for future null deref warning
Change-Id: I38590e08a6bd03a2ddfeda466b9cee7128c62aa7
This commit is contained in:
@@ -263,8 +263,8 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry)
|
|||||||
pFont = pFoundry->GetFontManger().CreateOverrideFont(pCharStyle->GetFinalFontID(),m_pModifiers->FontID);
|
pFont = pFoundry->GetFontManger().CreateOverrideFont(pCharStyle->GetFinalFontID(),m_pModifiers->FontID);
|
||||||
pStyle->SetFont(pFont);
|
pStyle->SetFont(pFont);
|
||||||
IXFStyleRet aNewStyle = pXFStyleManager->AddStyle(pStyle);
|
IXFStyleRet aNewStyle = pXFStyleManager->AddStyle(pStyle);
|
||||||
|
m_StyleName = aNewStyle.m_pStyle->GetStyleName();
|
||||||
pStyle = dynamic_cast<XFTextStyle*>(aNewStyle.m_pStyle);
|
pStyle = dynamic_cast<XFTextStyle*>(aNewStyle.m_pStyle);
|
||||||
m_StyleName = pStyle->GetStyleName();
|
|
||||||
if (aNewStyle.m_bOrigDeleted)
|
if (aNewStyle.m_bOrigDeleted)
|
||||||
pStyle = NULL;
|
pStyle = NULL;
|
||||||
}
|
}
|
||||||
@@ -279,8 +279,8 @@ void LwpFrib::RegisterStyle(LwpFoundry* pFoundry)
|
|||||||
pFont = pFoundry->GetFontManger().CreateFont(m_pModifiers->FontID);
|
pFont = pFoundry->GetFontManger().CreateFont(m_pModifiers->FontID);
|
||||||
pStyle->SetFont(pFont);
|
pStyle->SetFont(pFont);
|
||||||
IXFStyleRet aNewStyle = pXFStyleManager->AddStyle(pStyle);
|
IXFStyleRet aNewStyle = pXFStyleManager->AddStyle(pStyle);
|
||||||
|
m_StyleName = aNewStyle.m_pStyle->GetStyleName();
|
||||||
pStyle = dynamic_cast<XFTextStyle*>(aNewStyle.m_pStyle);
|
pStyle = dynamic_cast<XFTextStyle*>(aNewStyle.m_pStyle);
|
||||||
m_StyleName = pStyle->GetStyleName();
|
|
||||||
if (aNewStyle.m_bOrigDeleted)
|
if (aNewStyle.m_bOrigDeleted)
|
||||||
pStyle = NULL;
|
pStyle = NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user