vcl/source/edit/textdoc.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
New commits: commit c2b018b94408703aef4e5d3429a9c0ab826f5b7c Author: Julien Nabet <serval2...@yahoo.fr> Date: Mon Oct 30 22:29:37 2017 +0100 tdf#113519: fix crash by releasing returned unique_ptr Regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=19910c461230f70bb9e98ad44db3525f0d755724 tdf#112658: fix leak when calling TextEngine::SetAttrib Change-Id: Iee82196ca10d82e898d8806a11874c3bedc28895 Reviewed-on: https://gerrit.libreoffice.org/44077 Reviewed-by: Julien Nabet <serval2...@yahoo.fr> Tested-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/vcl/source/edit/textdoc.cxx b/vcl/source/edit/textdoc.cxx index 8734ea6e5705..267d774818d3 100644 --- a/vcl/source/edit/textdoc.cxx +++ b/vcl/source/edit/textdoc.cxx @@ -328,8 +328,7 @@ TextNode* TextNode::Split( sal_Int32 nPos ) SAL_WARN_IF( rAttrib.GetStart() < nPos, "vcl", "Start < nPos!" ); SAL_WARN_IF( rAttrib.GetEnd() < nPos, "vcl", "End < nPos!" ); // move all into the new node (this) - maCharAttribs.RemoveAttrib( nAttr ); - pNew->maCharAttribs.InsertAttrib( &rAttrib ); + pNew->maCharAttribs.InsertAttrib(maCharAttribs.RemoveAttrib(nAttr).release()); rAttrib.GetStart() = rAttrib.GetStart() - nPos; rAttrib.GetEnd() = rAttrib.GetEnd() - nPos; nAttr--; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits