From 51c879d8649c7aad7a0c9be0c7ea042d041254d8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 31 May 2018 08:29:01 +0200 Subject: simplify calls to *DialogFactory::Create methods we don't need to check for nullptr here, it's never null. Change-Id: I3cc5337a8f4dec6747821679e39ccba3cec20f56 Reviewed-on: https://gerrit.libreoffice.org/55114 Tested-by: Jenkins Reviewed-by: Noel Grandin --- scripting/source/protocolhandler/scripthandler.cxx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'scripting') diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx index 2933ab8b7f0d..f07e156ce178 100644 --- a/scripting/source/protocolhandler/scripthandler.cxx +++ b/scripting/source/protocolhandler/scripthandler.cxx @@ -258,16 +258,10 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification( if ( bCaughtException ) { SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); - - if ( pFact != nullptr ) - { - ScopedVclPtr pDlg( + ScopedVclPtr pDlg( pFact->CreateScriptErrorDialog( aException )); - - if ( pDlg ) - pDlg->Execute(); - } - } + pDlg->Execute(); + } if ( xListener.is() ) { -- cgit