dbaccess/source/ui/dlg/dbwizsetup.cxx | 8 +++----- vcl/jsdialog/jsdialogbuilder.cxx | 1 + 2 files changed, 4 insertions(+), 5 deletions(-)
New commits: commit 826b0fc9aacbe58c998aec8ebba3401c0a68a015 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Jun 2 08:57:21 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Jun 2 11:42:32 2022 +0200 cid#1504597 Dereference null return value Change-Id: I6b1b34375a70c3081d7f6d90766cb0df053de355 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135294 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 63be5dd12875..2c3e8fb7bb36 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -114,15 +114,13 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(weld::Window* _pParent , m_pGeneralPage( nullptr ) , m_pMySQLIntroPage( nullptr ) , m_pFinalPage( nullptr ) - , m_pCollection( nullptr ) { // no local resources needed anymore // extract the datasource type collection from the item set - const DbuTypeCollectionItem* pCollectionItem = dynamic_cast<const DbuTypeCollectionItem*>( _pItems->GetItem(DSID_TYPECOLLECTION) ); - if (pCollectionItem) - m_pCollection = pCollectionItem->getCollection(); + const DbuTypeCollectionItem& rCollectionItem = dynamic_cast<const DbuTypeCollectionItem&>(*_pItems->GetItem(DSID_TYPECOLLECTION)); + m_pCollection = rCollectionItem.getCollection(); - OSL_ENSURE(m_pCollection, "ODbTypeWizDialogSetup::ODbTypeWizDialogSetup : really need a DSN type collection !"); + assert(m_pCollection && "ODbTypeWizDialogSetup::ODbTypeWizDialogSetup : really need a DSN type collection !"); m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxORB, m_xAssistant.get(), _pParent, this)); m_pImpl->setDataSourceOrName(_aDataSourceName); commit 6eb1f2c45c16639aa0c7f70f700765348f7c0efe Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Jun 2 08:49:17 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Jun 2 11:42:19 2022 +0200 cid#1504591 Uninitialized scalar field Change-Id: I647888f13fc18010efc5ff6023790e91fa11611a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135293 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index ab1fdf7636c0..c4e3d23660c6 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -1792,6 +1792,7 @@ void JSMenuButton::set_active(bool bActive) JSPopover::JSPopover(JSDialogSender* pSender, DockingWindow* pDockingWindow, SalInstanceBuilder* pBuilder, bool bTakeOwnership) : JSWidget<SalInstancePopover, DockingWindow>(pSender, pDockingWindow, pBuilder, bTakeOwnership) + , mnWindowId(0) { }