diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-06-11 17:46:53 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-06-11 17:47:21 +0200 |
commit | 608a67ac73a14a563c5f7692d4ca5de28777f290 (patch) | |
tree | 74bb9b5ebd32135090057b594a1046fc7ece15a0 /lotuswordpro/source/filter/lwptablelayout.cxx | |
parent | Dead code (diff) | |
download | core-608a67ac73a14a563c5f7692d4ca5de28777f290.tar.gz core-608a67ac73a14a563c5f7692d4ca5de28777f290.zip |
Fix memory leaks, by refcounting XFContent
Change-Id: I8c94c63230eec13bf22043ff07f9f480a0463111
Diffstat (limited to 'lotuswordpro/source/filter/lwptablelayout.cxx')
-rw-r--r-- | lotuswordpro/source/filter/lwptablelayout.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lotuswordpro/source/filter/lwptablelayout.cxx b/lotuswordpro/source/filter/lwptablelayout.cxx index dd47ba034ba3..1a018a4edc47 100644 --- a/lotuswordpro/source/filter/lwptablelayout.cxx +++ b/lotuswordpro/source/filter/lwptablelayout.cxx @@ -1183,8 +1183,9 @@ void LwpTableLayout::PostProcessParagraph(XFCell *pCell, sal_uInt16 nRowID, sal_ LwpCellLayout * pCellLayout = GetCellByRowCol(nRowID, nColID); if(pCellLayout) { - XFParagraph * pXFPara = NULL; - pXFPara = static_cast<XFParagraph*>(pCell->FindFirstContent(enumXFContentPara)); + rtl::Reference<XFContent> first( + pCell->FindFirstContent(enumXFContentPara)); + XFParagraph * pXFPara = static_cast<XFParagraph*>(first.get()); if (!pXFPara) return; XFColor aNullColor = XFColor(); |