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:53:43 +0000 |
commit | 2487ba80581d8b0f50be40a26255789e1a050e95 (patch) | |
tree | ffc7260c437feaaa48d46b2cccaaa1314a96f572 /lotuswordpro | |
parent | ddc7d96a399822c2f29dcaca8222dfb96c383576 (diff) |
guard against missing header rows
Change-Id: Iaa28ef00572eb9c4ba3a6d8ae0c668b7b0132f56
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); |