From 1bdbb719fc95c403123e5cf3745a3667a88be702 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 7 Feb 2020 14:09:57 +0000 Subject: ofz#20517 null-dereference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I443869f848925911ed46e2f547f0dc652b1ff290 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88214 Tested-by: Jenkins Reviewed-by: Caolán McNamara (cherry picked from commit 08695569fd4fccc1722e7e3c7e0a234699199196) --- lotuswordpro/qa/cppunit/data/pass/ofz20517-1.lwp | Bin 0 -> 21429 bytes lotuswordpro/source/filter/lwprowlayout.cxx | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 lotuswordpro/qa/cppunit/data/pass/ofz20517-1.lwp diff --git a/lotuswordpro/qa/cppunit/data/pass/ofz20517-1.lwp b/lotuswordpro/qa/cppunit/data/pass/ofz20517-1.lwp new file mode 100644 index 000000000000..de6dcbf1c5d5 Binary files /dev/null and b/lotuswordpro/qa/cppunit/data/pass/ofz20517-1.lwp differ diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx b/lotuswordpro/source/filter/lwprowlayout.cxx index a09daa9aa2e4..da10c32888f7 100644 --- a/lotuswordpro/source/filter/lwprowlayout.cxx +++ b/lotuswordpro/source/filter/lwprowlayout.cxx @@ -379,11 +379,13 @@ void LwpRowLayout::ConvertCommonRow(rtl::Reference const & pXFTable, sa LwpTableLayout* pTableLayout = GetParentTableLayout(); if (!pTableLayout) return; + LwpTable* pTable = pTableLayout->GetTable(); + if (!pTable) + return; rtl::Reference xRow(new XFRow); xRow->SetStyleName(m_StyleName); - LwpTable* pTable = pTableLayout->GetTable(); sal_uInt8 nCellStartCol,nCellEndCol; for (sal_uInt8 i = nStartCol; i < nEndCol ; i++) -- cgit