From 6ebaafcc8b8dcce42f2752943dc0b76ad2edce0c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 19 Mar 2014 12:24:45 +0000 Subject: coverity#735755 Unchecked dynamic_cast Change-Id: Ica94951214a33713844d5a9209d74eb4c67409f7 --- lotuswordpro/source/filter/lwpcelllayout.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lotuswordpro/source/filter/lwpcelllayout.cxx b/lotuswordpro/source/filter/lwpcelllayout.cxx index d82e207e6012..169af71e3903 100644 --- a/lotuswordpro/source/filter/lwpcelllayout.cxx +++ b/lotuswordpro/source/filter/lwpcelllayout.cxx @@ -663,8 +663,8 @@ void LwpCellLayout::ApplyProtect(XFCell * pCell, LwpObjectID aTableID) { // judge whole table LwpTable * pTable = dynamic_cast(aTableID.obj()); - LwpTableLayout * pTableLayout = static_cast(pTable->GetTableLayout()); - LwpSuperTableLayout * pSuper = pTableLayout->GetSuperTableLayout(); + LwpTableLayout * pTableLayout = pTable ? static_cast(pTable->GetTableLayout()) : NULL; + LwpSuperTableLayout * pSuper = pTableLayout ? pTableLayout->GetSuperTableLayout() : NULL; if (pSuper && pSuper->IsProtected()) { bProtected = sal_True; -- cgit