sw/source/core/layout/tabfrm.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit a7a008d055eecf540b5d20060754cc686508a895
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed May 3 14:44:27 2023 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed May 3 21:46:13 2023 +0200

    tdf#147526 a macro case which results in a null Lower() result
    
    while deleting a table
    
    Change-Id: I5e80a654e668fbcd7086a904bbed853eacbfc08a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151327
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 6c8fa0ea9f55..c4310f1e4287 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2420,7 +2420,9 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
                 }
                 else if (m_bONECalcLowers)
                 {
-                    lcl_RecalcRow(*static_cast<SwRowFrame*>(Lower()), 
LONG_MAX);
+                    // tdf#147526 is a case of a macro which results in a null 
Lower() result
+                    if (SwRowFrame* pLower = static_cast<SwRowFrame*>(Lower()))
+                        lcl_RecalcRow(*pLower, LONG_MAX);
                     m_bONECalcLowers = false;
                 }
             }

Reply via email to