tdf#99815 fixups after XNotifyingDispatch

- remove unused variable
- check of given parameter over constructor

Change-Id: If506ef9065c67da35f672466e1e49f82e2a5a678
Reviewed-on: https://gerrit.libreoffice.org/26093
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
diff --git a/framework/source/services/dispatchhelper.cxx b/framework/source/services/dispatchhelper.cxx
index 9cb6166..7331177 100644
--- a/framework/source/services/dispatchhelper.cxx
+++ b/framework/source/services/dispatchhelper.cxx
@@ -80,11 +80,10 @@ css::uno::Any SAL_CALL DispatchHelper::executeDispatch(
                                const css::uno::Sequence< css::beans::PropertyValue >&      lArguments        )
    throw(css::uno::RuntimeException, std::exception)
{
    css::uno::Reference< css::uno::XInterface > xTHIS(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY);

    // check for valid parameters
    if (
        (!xDispatchProvider.is()) ||
        (!m_xContext.is())        ||
        (sURL.isEmpty()         )
       )
    {