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

coverity#735755 Unchecked dynamic_cast

Change-Id: Ica94951214a33713844d5a9209d74eb4c67409f7
üst 2c75e295
...@@ -663,8 +663,8 @@ void LwpCellLayout::ApplyProtect(XFCell * pCell, LwpObjectID aTableID) ...@@ -663,8 +663,8 @@ void LwpCellLayout::ApplyProtect(XFCell * pCell, LwpObjectID aTableID)
{ {
// judge whole table // judge whole table
LwpTable * pTable = dynamic_cast<LwpTable *>(aTableID.obj()); LwpTable * pTable = dynamic_cast<LwpTable *>(aTableID.obj());
LwpTableLayout * pTableLayout = static_cast<LwpTableLayout *>(pTable->GetTableLayout()); LwpTableLayout * pTableLayout = pTable ? static_cast<LwpTableLayout *>(pTable->GetTableLayout()) : NULL;
LwpSuperTableLayout * pSuper = pTableLayout->GetSuperTableLayout(); LwpSuperTableLayout * pSuper = pTableLayout ? pTableLayout->GetSuperTableLayout() : NULL;
if (pSuper && pSuper->IsProtected()) if (pSuper && pSuper->IsProtected())
{ {
bProtected = sal_True; bProtected = sal_True;
......
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