sc/source/ui/view/viewdata.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit b5cff69f7c6fcde2254ba88ae5582f53ed081837 Author: Caolán McNamara <[email protected]> AuthorDate: Tue May 6 13:48:56 2025 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Wed May 7 22:14:35 2025 +0200 apparent null-deref of pPattern seen Change-Id: Iabab952deb36ab86cce009f4f0b4f82b5d469efd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184994 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins (cherry picked from commit fcefdbbd390de622324e2e5e650e1bfb14ec5445) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185003 diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index 09e5f834ed44..ae22d10072db 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -1929,6 +1929,11 @@ void ScViewData::EditGrowX() // get bGrow... variables the same way as in SetEditEngine const ScPatternAttr* pPattern = rLocalDoc.GetPattern( nEditCol, nEditRow, nTabNo ); + if (!pPattern) + { + SAL_WARN("sc.viewdata", "No Pattern Found for: Col: " << nEditCol << ", Row: " << nEditRow << ", Tab: " << nTabNo); + pPattern = &rLocalDoc.getCellAttributeHelper().getDefaultCellAttribute(); + } SvxCellHorJustify eJust = pPattern->GetItem( ATTR_HOR_JUSTIFY ).GetValue(); bool bGrowCentered = ( eJust == SvxCellHorJustify::Center ); bool bGrowToLeft = ( eJust == SvxCellHorJustify::Right ); // visual left
