sc/source/ui/view/viewdata.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit fcefdbbd390de622324e2e5e650e1bfb14ec5445
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Tue May 6 13:48:56 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue May 6 20:24:36 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 <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins

diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 380b9d0b0cc0..41cd00126f81 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

Reply via email to