diff options
Diffstat (limited to 'lotuswordpro/source/filter/lwpbulletstylemgr.cxx')
-rw-r--r-- | lotuswordpro/source/filter/lwpbulletstylemgr.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/lwpbulletstylemgr.cxx b/lotuswordpro/source/filter/lwpbulletstylemgr.cxx index 033a8c7f4427..81ebbd5f175e 100644 --- a/lotuswordpro/source/filter/lwpbulletstylemgr.cxx +++ b/lotuswordpro/source/filter/lwpbulletstylemgr.cxx @@ -547,7 +547,9 @@ rtl::OUString LwpBulletStyleMgr::GetDivisionName() LwpObjectID* pID = pDoc->GetDivInfoID(); if (!pID->IsNull()) { - aRet = static_cast<LwpDivInfo*>(pID->obj(VO_DIVISIONINFO))->GetDivName(); + LwpDivInfo *pInfo = dynamic_cast<LwpDivInfo*>(pID->obj(VO_DIVISIONINFO)); + if (pInfo) + aRet = pInfo->GetDivName(); } } @@ -562,7 +564,7 @@ rtl::OUString LwpBulletStyleMgr::GetSectionName(LwpPara* pPara) return rtl::OUString(); } - LwpStory* pStory = static_cast<LwpStory*>(pStoryID->obj(VO_STORY)); + LwpStory* pStory = dynamic_cast<LwpStory*>(pStoryID->obj(VO_STORY)); if (!pStory) { return rtl::OUString(); |