diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-04-07 09:38:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-04-07 10:14:49 +0100 |
commit | aa21145ef3b942f6db530f035c6ea9a246151241 (patch) | |
tree | 42a914de7722b3991e421af55b0dc39a18348350 /sw | |
parent | 3982bcd07349d8c8c6ab00d7777c6a9a6f4a8ddb (diff) |
coverity#705025 Explicit null dereferenced
Change-Id: I6fa17cf08c8104b7b64f66f6701fe8d0949b88bc
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/uibase/shells/drwbassh.cxx | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/sw/source/core/uibase/shells/drwbassh.cxx b/sw/source/core/uibase/shells/drwbassh.cxx index 71ce949f9df6..be1fea36e8d8 100644 --- a/sw/source/core/uibase/shells/drwbassh.cxx +++ b/sw/source/core/uibase/shells/drwbassh.cxx @@ -202,27 +202,18 @@ void SwDrawBaseShell::Execute(SfxRequest &rReq) if (bCaption) { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - if ( pFact ) - { - AbstractSvxCaptionDialog* pCaptionDlg = - pFact->CreateCaptionDialog( NULL, pSdrView, nAllowedAnchors ); - pCaptionDlg->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) ); - pDlg = pCaptionDlg; - OSL_ENSURE(pDlg, "Dialogdiet fail!"); - } + AbstractSvxCaptionDialog* pCaptionDlg = + pFact->CreateCaptionDialog( NULL, pSdrView, nAllowedAnchors ); + pCaptionDlg->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) ); + pDlg = pCaptionDlg; } else { SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - if ( pFact ) - { - - AbstractSvxTransformTabDialog* pTransform = - pFact->CreateSvxTransformTabDialog( NULL, NULL, pSdrView, nAllowedAnchors ); - pTransform->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) ); - pDlg = pTransform; - OSL_ENSURE(pDlg, "Dialogdiet fail!"); - } + AbstractSvxTransformTabDialog* pTransform = + pFact->CreateSvxTransformTabDialog( NULL, NULL, pSdrView, nAllowedAnchors ); + pTransform->SetValidateFramePosLink( LINK(this, SwDrawBaseShell, ValidatePosition) ); + pDlg = pTransform; } SfxItemSet aNewAttr(pSdrView->GetGeoAttrFromMarked()); |