diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-02 15:27:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-02 20:08:20 +0000 |
commit | 4d3fc566d9b610e9cca47ba0a984c679ab6ca086 (patch) | |
tree | eed03b55b5c060efb9c62f91a7f26d48de6d9745 /sc/source/ui/view/tabvwsh3.cxx | |
parent | 61b8232219fd3e98d8f3a3894b9e97a4c1b36317 (diff) |
coverity#704724 Dereference after null check
Change-Id: Icb7570225d3ae0f5a62d2e7f601c2ce729e55a1b
Diffstat (limited to 'sc/source/ui/view/tabvwsh3.cxx')
-rw-r--r-- | sc/source/ui/view/tabvwsh3.cxx | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx index 02ec2751cdf2..76b9e2b5dc2b 100644 --- a/sc/source/ui/view/tabvwsh3.cxx +++ b/sc/source/ui/view/tabvwsh3.cxx @@ -670,23 +670,24 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) } if (pDlg) { - pDlg->SetLimits( MINZOOM, MAXZOOM ); + pDlg->SetLimits( MINZOOM, MAXZOOM ); - bCancel = ( RET_CANCEL == pDlg->Execute() ); - } - // bCancel is True only if we were in the previous if block, - // so no need to check again pDlg - if ( !bCancel ) - { - const SvxZoomItem& rZoomItem = (const SvxZoomItem&) - pDlg->GetOutputItemSet()-> - Get( SID_ATTR_ZOOM ); + bCancel = ( RET_CANCEL == pDlg->Execute() ); - eNewZoomType = rZoomItem.GetType(); - nZoom = rZoomItem.GetValue(); - } + // bCancel is True only if we were in the previous if block, + // so no need to check again pDlg + if ( !bCancel ) + { + const SvxZoomItem& rZoomItem = (const SvxZoomItem&) + pDlg->GetOutputItemSet()-> + Get( SID_ATTR_ZOOM ); - delete pDlg; + eNewZoomType = rZoomItem.GetType(); + nZoom = rZoomItem.GetValue(); + } + + delete pDlg; + } } if ( !bCancel ) |