diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-13 11:53:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-13 11:54:14 +0000 |
commit | 27f138b27b14827485e587cf924a227b8aabe91f (patch) | |
tree | cbfe7ea52af8ae850be9d5cb5fbe26b072ea94fa /lotuswordpro | |
parent | 9763835df0c79c4dfad0d12fce34ca465b48e498 (diff) |
guard against missing header rows
Change-Id: Iaa28ef00572eb9c4ba3a6d8ae0c668b7b0132f56
(cherry picked from commit 2487ba80581d8b0f50be40a26255789e1a050e95)
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/xfilter/xftable.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lotuswordpro/source/filter/xfilter/xftable.cxx b/lotuswordpro/source/filter/xfilter/xftable.cxx index 9a96db8d5077..d139a85130c6 100644 --- a/lotuswordpro/source/filter/xfilter/xftable.cxx +++ b/lotuswordpro/source/filter/xfilter/xftable.cxx @@ -104,9 +104,11 @@ void XFTable::AddRow(XFRow *pRow) m_aRows[row] = pRow; } -void XFTable::AddHeaderRow(XFRow *pRow) +void XFTable::AddHeaderRow(XFRow *pRow) { - if( !pRow ) + if( !pRow) + return; + if (!m_aHeaderRows.is()) return; m_aHeaderRows->Add(pRow); } @@ -207,7 +209,7 @@ void XFTable::ToXml(IXFStream *pStrm) } } - if( m_aHeaderRows->GetCount()>0 ) + if (m_aHeaderRows.is() && m_aHeaderRows->GetCount()>0) { pStrm->StartElement( "table:table-header-rows" ); m_aHeaderRows->ToXml(pStrm); |