diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-13 20:59:12 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-13 22:38:35 +0100 |
commit | f353e7baaace4e0bce3dbd1d440dc5be9ac35298 (patch) | |
tree | 6ea4f6c16dc184746560a73c0e25e76bbea96eff /sd | |
parent | 8d4088c23b83de1a418014ea5957a0dc3efed7e4 (diff) |
coverity#1326205 Unchecked dynamic_cast
Change-Id: I1fe77d041a281b14d6af15f25bd06ac78420c608
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/view/ViewShellBase.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 3f8c2c35b9a1..4fa70785224d 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -1270,12 +1270,13 @@ void ViewShellBase::Implementation::GetSlotState (SfxItemSet& rSet) ViewShell* pCenterViewShell = FrameworkHelper::Instance(mrBase)->GetViewShell( FrameworkHelper::msCenterPaneURL).get(); bool bMasterPageMode (false); - if (pCenterViewShell!=NULL && dynamic_cast< DrawViewShell *>( pCenterViewShell ) != nullptr) - if (dynamic_cast< DrawViewShell *>( pCenterViewShell )->GetEditMode() - == EM_MASTERPAGE) + if (DrawViewShell* pShell = dynamic_cast<DrawViewShell*>(pCenterViewShell)) + { + if (pShell->GetEditMode() == EM_MASTERPAGE) { bMasterPageMode = true; } + } bState &= !bMasterPageMode; break; |