summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-04 20:24:31 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-05 09:20:52 +0200
commitf705132f20eb9e0cbe57f11f1f9594a287a63900 (patch)
tree177d628524787ae61e087879111b47b14b1e19a5 /sc
parent94cda7386e06d75d26fd997db36981731f49e081 (diff)
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.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/drwlayer.cxx3
1 files changed, 2 insertions, 1 deletions
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)
{