diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-13 21:05:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-13 22:38:36 +0100 |
commit | ffbcf926cf7c661521861cdf4bcc90d5ec4dca9a (patch) | |
tree | 94352c793ab46816b0717b72b75dc821ace0cbba /sd | |
parent | coverity#1326118 Constant expression result (diff) | |
download | core-ffbcf926cf7c661521861cdf4bcc90d5ec4dca9a.tar.gz core-ffbcf926cf7c661521861cdf4bcc90d5ec4dca9a.zip |
coverity#735838 Dereference after null check
Change-Id: I5a0a9cfdac0444beb049bf9e883ffced25500950
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/func/fuprlout.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx index 16665d1c6f64..ab74fae5d2ac 100644 --- a/sd/source/ui/func/fuprlout.cxx +++ b/sd/source/ui/func/fuprlout.cxx @@ -93,10 +93,9 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq ) /* if we are on a master page, the changes apply for all pages and notes- pages who are using the relevant layout */ bool bOnMaster = false; - if( mpViewShell && dynamic_cast< const DrawViewShell *>( mpViewShell ) != nullptr) + if (DrawViewShell *pShell = dynamic_cast<DrawViewShell*>(mpViewShell)) { - EditMode eEditMode = - static_cast<DrawViewShell*>(mpViewShell)->GetEditMode(); + EditMode eEditMode = pShell->GetEditMode(); if (eEditMode == EM_MASTERPAGE) bOnMaster = true; } |