sc/source/core/data/drwlayer.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit f705132f20eb9e0cbe57f11f1f9594a287a63900 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Aug 4 20:24:31 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Aug 5 09:20:52 2022 +0200 tdf#150219 Crash when cutting trace dependent with precedent on different sheet not sure exactly where the real bug is. This only started to show up when I changed the data structures in commit 3596c9891e16e1222208b18bdcdc9909c2f02d0f Date: Thu Jan 16 12:10:54 2020 +0200 use std::vector in ScMarkArray, instead of re-inventing the wheel before that it would harmlessly read from adjacent memory because nCol and nRow are -1. Change-Id: Iddf109eed04ddc57d5b6743f232eea940e42bd9b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137834 Tested-by: Noel Grandin <noel.gran...@collabora.co.uk> Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index bd4bd01b6f3e..6302f044eea7 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -1658,7 +1658,8 @@ void ScDrawLayer::DeleteObjectsInSelection( const ScMarkData& rMark ) ScAnchorType aAnchorType = ScDrawLayer::GetAnchorType(*pObject); bool bObjectAnchoredToMarkedCell = ((aAnchorType == SCA_CELL || aAnchorType == SCA_CELL_RESIZE) - && pObjData && rMark.IsCellMarked(pObjData->maStart.Col(), + && pObjData && pObjData->maStart.IsValid() + && rMark.IsCellMarked(pObjData->maStart.Col(), pObjData->maStart.Row())); if (bObjectInMarkArea || bObjectAnchoredToMarkedCell) {