sc/source/ui/view/viewdata.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit bee970ca91aebfdd516f78ee991b02758b2cc1f1 Author: Caolán McNamara <[email protected]> AuthorDate: Tue May 6 13:48:56 2025 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Tue May 6 15:16:58 2025 +0200 apparent null-deref of pPattern seen Change-Id: Iabab952deb36ab86cce009f4f0b4f82b5d469efd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184993 Reviewed-by: Michael Meeks <[email protected]> Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx index c0178f4ec025..aac850ca7609 100644 --- a/sc/source/ui/view/viewdata.cxx +++ b/sc/source/ui/view/viewdata.cxx @@ -1942,6 +1942,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
