diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2024-03-04 13:21:06 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2024-03-19 17:59:57 +0100 |
commit | b2f5db9d7c590a0dbbb6062008520a84854d582c (patch) | |
tree | 23df0c8aebe5327286aabd30ac9543fc705bec21 | |
parent | eaf9c8ccb68dfdfb1f509c43ed922f18fa6f5e74 (diff) |
tdf#159373: band-aid for crash in: ScTable::HasAttrib
band-aid because as Eike indicated in https://bugs.documentfoundation.org/show_bug.cgi?id=159373#c8
"Question remains why this PostPaint() is called at all for an invalid range.."
Change-Id: Ie44378119202addd8ddb46f0be4b0124be9fd48b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164354
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164623
(cherry picked from commit 4d2338ef6ac34ce248c868b05f6fcbf45e6428c2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164628
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r-- | sc/source/ui/docshell/docsh3.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/ui/docshell/docsh3.cxx b/sc/source/ui/docshell/docsh3.cxx index 789737e5f824..c60bd2964492 100644 --- a/sc/source/ui/docshell/docsh3.cxx +++ b/sc/source/ui/docshell/docsh3.cxx @@ -116,6 +116,9 @@ void ScDocShell::PostPaint( const ScRangeList& rRanges, PaintPartFlags nPart, sa SCROW nRow1 = rRange.aStart.Row(), nRow2 = rRange.aEnd.Row(); SCTAB nTab1 = rRange.aStart.Tab(), nTab2 = rRange.aEnd.Tab(); + if (nTab1 < 0 || nTab2 < 0) + continue; + if (!m_pDocument->ValidCol(nCol1)) nCol1 = m_pDocument->MaxCol(); if (!m_pDocument->ValidRow(nRow1)) nRow1 = m_pDocument->MaxRow(); if (!m_pDocument->ValidCol(nCol2)) nCol2 = m_pDocument->MaxCol(); |