Kaydet (Commit) a5cd6eb9 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#7729 Null-dereference READ

Change-Id: I223f4f7fd622822b42d8e7cb342d451c54d6dcbd
Reviewed-on: https://gerrit.libreoffice.org/53017Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 335036f0
...@@ -543,8 +543,13 @@ OUString LwpTableLayout::GetColumnWidth(sal_uInt16 nCol) ...@@ -543,8 +543,13 @@ OUString LwpTableLayout::GetColumnWidth(sal_uInt16 nCol)
*/ */
void LwpTableLayout::RegisterColumns() void LwpTableLayout::RegisterColumns()
{ {
LwpTable * pTable = GetTable(); LwpTable* pTable = GetTable();
LwpSuperTableLayout * pSuper = GetSuperTableLayout(); if (!pTable)
throw std::range_error("corrupt LwpTableLayout");
LwpSuperTableLayout* pSuper = GetSuperTableLayout();
if (!pSuper)
throw std::range_error("corrupt LwpTableLayout");
sal_uInt16 nCols = m_nCols; sal_uInt16 nCols = m_nCols;
...@@ -556,9 +561,6 @@ void LwpTableLayout::RegisterColumns() ...@@ -556,9 +561,6 @@ void LwpTableLayout::RegisterColumns()
m_aColumns[i] = nullptr; m_aColumns[i] = nullptr;
} }
if (!pTable)
throw std::range_error("corrupt LwpTableLayout");
double dDefaultColumn = pTable->GetWidth(); double dDefaultColumn = pTable->GetWidth();
sal_uInt16 nJustifiableColumn = nCols; sal_uInt16 nJustifiableColumn = nCols;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment