diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-05-16 17:58:12 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-05-17 00:43:25 +0200 |
commit | 44c81ce21825554aad8dcebd58388cb5c0f81df8 (patch) | |
tree | d98c5ee9142a05dabd06fa4a7bb8ee1f48bc70b6 | |
parent | 53130f7afb3fcf39f95f69e3752cec1fa00d6d93 (diff) |
sw: try to fix a valgrind warning
Invalid read of size 1
at SwParaPortion::SetPrep(bool) (porlay.hxx:299)
by SwTxtFrm::Prepare(PrepareHint, void const*, bool) (txtfrm.cxx:1756)
by SwTxtFrm::Prepare(PrepareHint, void const*, bool) (txtfrm.cxx:1663)
by SwCntntFrm::MakeAll() (calcmove.cxx:1310)
by SwFrm::OptPrepareMake() (calcmove.cxx:356)
by SwFrm::OptCalc() const (frame.hxx:1037)
by SwLayAction::_FormatCntnt(SwCntntFrm const*, SwPageFrm const*) (layact.cxx:1829)
by SwLayAction::FormatCntnt(SwPageFrm const*) (layact.cxx:1660)
by SwLayAction::InternalAction() (layact.cxx:597)
by SwLayAction::Action() (layact.cxx:376)
by SwLayIdle::SwLayIdle(SwRootFrm*, SwViewImp*) (layact.cxx:2179)
Address 0x1f9507e0 is 832 bytes inside a block of size 840 free'd
by FixedMemPool::Free(void*) (mempool.cxx:48)
by SwParaPortion::operator delete(void*, unsigned long) (in /work/lo/master/instdir/program/libswlo.so)
by SwParaPortion::~SwParaPortion() (porlay.cxx:1972)
by SwTxtFrm::ClearPara() (txtcache.cxx:102)
by SwTxtFrm::Init() (txtfrm.cxx:329)
by SwTxtFrm::CalcLineSpace() (txtfrm.cxx:746)
by SwTxtFrm::Prepare(PrepareHint, void const*, bool) (txtfrm.cxx:1680)
by SwTxtFrm::Prepare(PrepareHint, void const*, bool) (txtfrm.cxx:1663)
by SwCntntFrm::MakeAll() (calcmove.cxx:1310)
by SwFrm::OptPrepareMake() (calcmove.cxx:356)
by SwFrm::OptCalc() const (frame.hxx:1037)
by SwLayAction::_FormatCntnt(SwCntntFrm const*, SwPageFrm const*) (layact.cxx:1829)
by SwLayAction::FormatCntnt(SwPageFrm const*) (layact.cxx:1660)
by SwLayAction::InternalAction() (layact.cxx:597)
by SwLayAction::Action() (layact.cxx:376)
by SwLayIdle::SwLayIdle(SwRootFrm*, SwViewImp*) (layact.cxx:2179)
Change-Id: I64a1cc6ea301b653af951ba0e00e28d4655d2d97
-rw-r--r-- | sw/source/core/text/txtfrm.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index bd4fc8cf1b08..ab0d613c7f7d 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -1678,6 +1678,8 @@ void SwTxtFrm::Prepare( const PrepareHint ePrep, const void* pVoid, { pPara->SetPrepAdjust(); CalcLineSpace(); + // possible that pPara was deleted above; retrieve it again + pPara = aAccess.GetPara(); InvalidateSize(); _InvalidatePrt(); SwFrm* pNxt; |