Re: joehe - r33229 - abiword/branches/gsoc2013tables/src/text/fmt/xp

From: Hubert Figuière <hfiguiere_at_teaser.fr>
Date: Mon Jul 08 2013 - 18:34:16 CEST

> -void fp_TableContainer::identifyHeaderRows(const std::vector<UT_sint32>& )
> +void fp_TableContainer::identifyHeaderRows(const std::vector<UT_sint32>& vecHeaderRows)
> {
> -
> + if(m_pTableHeader != NULL)
> + {
> + m_pTableHeader = new fp_TableHeader(getSectionLayout(),this);
> + }
> + m_pTableHeader->createLocalListOfHeaderRows(vecHeaderRows);
> }

Joe,

Are you sure this code is correct? To me it looks like the if() should
check if m_pTableHeader is NULL.

Current the code will 1. overwrite an existing fp_TableHeader point
causing a memory like and 2. crash because otherwise it will try to
dereference NULL.

Cheers,

Hub
Received on Mon Jul 8 18:34:34 2013

This archive was generated by hypermail 2.1.8 : Mon Jul 08 2013 - 18:34:34 CEST