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

New commits:
commit 11990fdfae41255a1f1446d1d00f50838c5fcc83
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed May 3 14:44:27 2023 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Thu May 4 10:31:20 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/+/151283
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index d75a20955409..0200c9fb09cd 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2396,7 +2396,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