diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-10-27 10:12:37 +0000 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2021-04-09 23:22:08 +0200 |
commit | 0a90148e8eac598c2ff68d8f3207675d702dd36a (patch) | |
tree | a691d441af4058bc2a801911e27125600c2b8db9 | |
parent | cef64fd65b9728dec7841fe0c925d81675870f65 (diff) |
ofz#26676 null deref
Change-Id: Ic2bd8b49762266ad48263bd68a143b46fb5fd66f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104863
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 9bf58fd45814f10ecf6131aeeec86123a383723f)
-rw-r--r-- | lotuswordpro/source/filter/lwptablelayout.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx index 0f3b0d21b30e..403127d166ea 100644 --- a/lotuswordpro/source/filter/lwptablelayout.cxx +++ b/lotuswordpro/source/filter/lwptablelayout.cxx @@ -879,7 +879,14 @@ sal_uInt16 LwpTableLayout::ConvertHeadingRow( XFRow* pXFRow = pTmpTable->GetRow(1); pXFTable->AddHeaderRow(pXFRow); pTmpTable->RemoveRow(1); - nContentRow = m_RowsMap[0]->GetCurMaxSpannedRows(0,nCol); + auto iter = m_RowsMap.find(0); + if (iter == m_RowsMap.end()) + { + SAL_WARN("lwp", "row 0 is unknown"); + nContentRow = 0; + } + else + nContentRow = iter->second->GetCurMaxSpannedRows(0,nCol); } } return nContentRow; |