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

guard against missing ContentContainer

Change-Id: I4f2c5d53148deb02d990edc42140c23f02409cea
üst a0839a85
...@@ -111,7 +111,7 @@ void LwpFribTable::XFConvert(XFContentContainer* pCont) ...@@ -111,7 +111,7 @@ void LwpFribTable::XFConvert(XFContentContainer* pCont)
pXFContentContainer = m_pPara->GetXFContainer(); pXFContentContainer = m_pPara->GetXFContainer();
//delete the additional blank para //delete the additional blank para
XFParagraph* pCurrPara = m_pPara->GetFribs().GetXFPara(); XFParagraph* pCurrPara = m_pPara->GetFribs().GetXFPara();
if(!pCurrPara->HasContents()) if (pXFContentContainer && !pCurrPara->HasContents())
{ {
if(pXFContentContainer->GetLastContent() == pCurrPara) if(pXFContentContainer->GetLastContent() == pCurrPara)
{ {
...@@ -142,18 +142,20 @@ void LwpFribTable::XFConvert(XFContentContainer* pCont) ...@@ -142,18 +142,20 @@ void LwpFribTable::XFConvert(XFContentContainer* pCont)
LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance(); LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
LwpChangeMgr* pChangeMgr = pGlobal->GetLwpChangeMgr(); LwpChangeMgr* pChangeMgr = pGlobal->GetLwpChangeMgr();
sChangeID = pChangeMgr->GetChangeID(this); sChangeID = pChangeMgr->GetChangeID(this);
if (!sChangeID.isEmpty()) if (!sChangeID.isEmpty() && pXFContentContainer)
{ {
XFChangeStart* pChangeStart = new XFChangeStart; XFChangeStart* pChangeStart = new XFChangeStart;
pChangeStart->SetChangeID(sChangeID); pChangeStart->SetChangeID(sChangeID);
pXFContentContainer->Add(pChangeStart); pXFContentContainer->Add(pChangeStart);
} }
} }
pSuper->XFConvert(pXFContentContainer);
if (pXFContentContainer)
pSuper->XFConvert(pXFContentContainer);
if(m_bRevisionFlag) if(m_bRevisionFlag)
{ {
if (!sChangeID.isEmpty()) if (!sChangeID.isEmpty() && pXFContentContainer)
{ {
XFChangeEnd* pChangeEnd = new XFChangeEnd; XFChangeEnd* pChangeEnd = new XFChangeEnd;
pChangeEnd->SetChangeID(sChangeID); pChangeEnd->SetChangeID(sChangeID);
......
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