writerfilter/source/dmapper/TableManager.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
New commits: commit 98a69f2a002079f4d0c75441659d54ea6597e4b2 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Thu Oct 26 16:16:04 2023 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Fri Oct 27 10:41:05 2023 +0200 sw floattable: fix nullptr deref in TableManager::endLevel() This is never an empty reference in the interesting use-case, so just make sure we don't crash. Reported to be a regression from 2d43c34333076fad092f0cdc0f60f81580acdbee (Related: tdf#55160 sw floattable, nested DOCX imp: fix inner tbl at cell start, 2023-09-15). See <https://crashreport.libreoffice.org/stats/signature/writerfilter::dmapper::TableManager::endLevel()>, e.g. <https://crashreport.libreoffice.org/stats/crash_details/84c2a273-49a3-4e62-9cfe-5cd620767749>. Change-Id: I4cd9c35ae3813a67d13d9b9e60f0dd6058f510c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158508 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> (cherry picked from commit 8ad82fc115a337604c064d37adfffcc81440248e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158530 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/writerfilter/source/dmapper/TableManager.cxx b/writerfilter/source/dmapper/TableManager.cxx index d0f90bd20729..5554a93d9fcf 100644 --- a/writerfilter/source/dmapper/TableManager.cxx +++ b/writerfilter/source/dmapper/TableManager.cxx @@ -444,7 +444,10 @@ void TableManager::endLevel() { xCursor = xCellStart->getText()->createTextCursorByRange( xCellStart->getStart()); - xCursor->goLeft(1, false); + if (xCursor.is()) + { + xCursor->goLeft(1, false); + } } catch (const uno::RuntimeException&) {