diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-05 16:24:25 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-05 20:41:04 +0000 |
commit | 0b6726867de88e49b9de19ea7da7defb7f808130 (patch) | |
tree | 775b8d766448ab055b01e892853e95fed4ac6f99 | |
parent | 7eaa311ce2d917ac961eac0a26a7ced90dffdf40 (diff) |
coverity#704748 Dereference after null check
Change-Id: I4dd13cb4a39422b26d4e695c1fbb739eaee96368
-rw-r--r-- | sd/source/ui/func/fucopy.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx index ee4e94896fd7..a2b1b1de2e3a 100644 --- a/sd/source/ui/func/fucopy.cxx +++ b/sd/source/ui/func/fucopy.cxx @@ -100,27 +100,27 @@ void FuCopy::DoExecute( SfxRequest& rReq ) if( pFact ) { AbstractCopyDlg* pDlg = pFact->CreateCopyDlg(NULL, aSet, mpDoc->GetColorList(), mpView ); - if( pDlg ) + if (!pDlg) + return; + + sal_uInt16 nResult = pDlg->Execute(); + + switch( nResult ) { - sal_uInt16 nResult = pDlg->Execute(); + case RET_OK: + pDlg->GetAttr( aSet ); + rReq.Done( aSet ); + pArgs = rReq.GetArgs(); + break; - switch( nResult ) + default: { - case RET_OK: - pDlg->GetAttr( aSet ); - rReq.Done( aSet ); - pArgs = rReq.GetArgs(); - break; - - default: - { - delete pDlg; - mpView->EndUndo(); - } - return; // Cancel + delete pDlg; + mpView->EndUndo(); } - delete( pDlg ); + return; // Cancel } + delete pDlg; } } |