From 7eaa311ce2d917ac961eac0a26a7ced90dffdf40 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 5 Mar 2014 16:21:53 +0000 Subject: coverity#704747 Dereference after null check Change-Id: I1da494393c3a1a697bf31b00f57b33a03c674872 --- sd/source/ui/func/fuchar.cxx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/func/fuchar.cxx b/sd/source/ui/func/fuchar.cxx index 95d3027fd013..d9549b1e7dd2 100644 --- a/sd/source/ui/func/fuchar.cxx +++ b/sd/source/ui/func/fuchar.cxx @@ -72,13 +72,15 @@ void FuChar::DoExecute( SfxRequest& rReq ) SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); SfxAbstractTabDialog* pDlg = pFact ? pFact->CreateSdTabCharDialog( NULL, &aNewAttr, mpDoc->GetDocSh() ) : 0; + sal_uInt16 nResult = RET_CANCEL; if( pDlg ) { if (rReq.GetSlot() == SID_CHAR_DLG_EFFECT) { pDlg->SetCurPageId(RID_SVXPAGE_CHAR_EFFECTS); } - sal_uInt16 nResult = pDlg->Execute(); + + nResult = pDlg->Execute(); if( nResult == RET_OK ) { @@ -87,11 +89,10 @@ void FuChar::DoExecute( SfxRequest& rReq ) } delete pDlg; - - if( nResult != RET_OK ) - { - return; - } + } + if( nResult != RET_OK ) + { + return; } } mpView->SetAttributes(*pArgs); -- cgit