sc/source/ui/miscdlgs/redcom.cxx | 2 +- sc/source/ui/unoobj/docuno.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
New commits: commit 25747014cd54d66f55029f67886418b859f9b980 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun May 22 12:24:47 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun May 22 15:17:08 2022 +0200 cid#1504538 Dereference after null check and cid#1504536 Dereference after null check Change-Id: If727df50e9e375b0ebd30e7537ac3d88ad72dc11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134731 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/miscdlgs/redcom.cxx b/sc/source/ui/miscdlgs/redcom.cxx index 30e2f8a591a9..f81da032b481 100644 --- a/sc/source/ui/miscdlgs/redcom.cxx +++ b/sc/source/ui/miscdlgs/redcom.cxx @@ -129,7 +129,7 @@ void ScRedComDialog::Execute() void ScRedComDialog::SelectCell() { - if(pChangeAction==nullptr) + if (!pChangeAction || !pDocShell) return; const ScChangeAction* pAction=pChangeAction; commit 1a9c3c13cb5c652d7bc92618e0f1bebf58ed76c6 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Sun May 22 12:23:36 2022 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Sun May 22 15:16:54 2022 +0200 cid#1504545 Dereference after null check Change-Id: If23314cca9eec9c4b9cf668945976327184d5690 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134730 Tested-by: Caolán McNamara <caol...@redhat.com> Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 79e51e44f633..9bc6d1604c70 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -1683,7 +1683,7 @@ bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection, // restrict to selected sheets if a view is available uno::Reference<sheet::XSelectedSheetsSupplier> xSelectedSheets(xView, uno::UNO_QUERY); - if (bSelectedSheetsOnly && xSelectedSheets.is()) + if (bSelectedSheetsOnly && pDocShell && xSelectedSheets.is()) { const uno::Sequence<sal_Int32> aSelected = xSelectedSheets->getSelectedSheets(); ScMarkData::MarkedTabsType aSelectedTabs;