summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-05 16:40:41 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-05 20:41:05 +0000
commitbcea4ec750aa358c75b909633c7a8cd1b7f13a9b (patch)
tree2a3f7420416e475244b6522dabeaea5f48618b27 /sd
parent229e59d478c77160659c93ed328b883552519e09 (diff)
coverity#704754 Dereference after null check
Change-Id: I3c70c9cfe84dc74836cf733e424cf7c2cd195c4f
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/func/fuparagr.cxx34
1 files changed, 17 insertions, 17 deletions
diff --git a/sd/source/ui/func/fuparagr.cxx b/sd/source/ui/func/fuparagr.cxx
index 512bd7add43a..e4250eddaa58 100644
--- a/sd/source/ui/func/fuparagr.cxx
+++ b/sd/source/ui/func/fuparagr.cxx
@@ -91,28 +91,28 @@ void FuParagraph::DoExecute( SfxRequest& rReq )
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
SfxAbstractTabDialog* pDlg = pFact ? pFact->CreateSdParagraphTabDlg(NULL, &aNewAttr ) : 0;
- if( pDlg )
+ if (!pDlg)
+ return;
+
+ sal_uInt16 nResult = pDlg->Execute();
+
+ switch( nResult )
{
- sal_uInt16 nResult = pDlg->Execute();
+ case RET_OK:
+ {
+ rReq.Done( *( pDlg->GetOutputItemSet() ) );
+
+ pArgs = rReq.GetArgs();
+ }
+ break;
- switch( nResult )
+ default:
{
- case RET_OK:
- {
- rReq.Done( *( pDlg->GetOutputItemSet() ) );
-
- pArgs = rReq.GetArgs();
- }
- break;
-
- default:
- {
- delete pDlg;
- }
- return; // Cancel
+ delete pDlg;
}
- delete( pDlg );
+ return; // Cancel
}
+ delete( pDlg );
}
mpView->SetAttributes( *pArgs );