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 <caolanm@redhat.com>
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 6c8fa0e..c4310f1 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;
                }
            }