summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lotuswordpro/qa/cppunit/data/fail/null-1.lwpbin0 -> 15952 bytes
-rw-r--r--lotuswordpro/source/filter/lwpfribsection.cxx8
2 files changed, 4 insertions, 4 deletions
diff --git a/lotuswordpro/qa/cppunit/data/fail/null-1.lwp b/lotuswordpro/qa/cppunit/data/fail/null-1.lwp
new file mode 100644
index 000000000000..06b8254431df
--- /dev/null
+++ b/lotuswordpro/qa/cppunit/data/fail/null-1.lwp
Binary files differ
diff --git a/lotuswordpro/source/filter/lwpfribsection.cxx b/lotuswordpro/source/filter/lwpfribsection.cxx
index cd6884b59c73..2d992f1d31fc 100644
--- a/lotuswordpro/source/filter/lwpfribsection.cxx
+++ b/lotuswordpro/source/filter/lwpfribsection.cxx
@@ -314,11 +314,11 @@ void LwpMasterPage::RegisterMasterPage(LwpFrib* pFrib)
XFSectionStyle* pSectStyle= new XFSectionStyle();
//set margin
pStory = dynamic_cast<LwpStory*>(m_pPara->GetStoryID().obj().get());
- if (pStory)
+ LwpPageLayout* pCurrentLayout = pStory ? pStory->GetCurrentLayout() : nullptr;
+ if (pCurrentLayout)
{
- LwpPageLayout* pCurrentLayout = pStory->GetCurrentLayout();
- double fLeft = m_pLayout->GetMarginsValue(MARGIN_LEFT)- pCurrentLayout->GetMarginsValue(MARGIN_LEFT);
- double fRight = m_pLayout->GetMarginsValue(MARGIN_RIGHT)- pCurrentLayout->GetMarginsValue(MARGIN_RIGHT);
+ double fLeft = m_pLayout->GetMarginsValue(MARGIN_LEFT) - pCurrentLayout->GetMarginsValue(MARGIN_LEFT);
+ double fRight = m_pLayout->GetMarginsValue(MARGIN_RIGHT) - pCurrentLayout->GetMarginsValue(MARGIN_RIGHT);
pSectStyle->SetMarginLeft(fLeft);
pSectStyle->SetMarginRight(fRight);
}