starmath/source/edit.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
New commits: commit 65a82fd7c04fd029ada6376749f74043bc80e216 Author: Julien Nabet <[email protected]> Date: Sat Oct 7 10:12:15 2017 +0200 Fix leak in smEditWindow (starmath) Change-Id: I7eb2af795d4b7d3619fe78ae16ea5796e5943f2c Reviewed-on: https://gerrit.libreoffice.org/43221 Tested-by: Jenkins <[email protected]> Reviewed-by: Julien Nabet <[email protected]> diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx index bf0544aec870..61721a2ee91a 100644 --- a/starmath/source/edit.cxx +++ b/starmath/source/edit.cxx @@ -28,6 +28,7 @@ #include <editeng/editview.hxx> #include <editeng/editeng.hxx> #include <editeng/editstat.hxx> +#include <o3tl/make_unique.hxx> #include <sfx2/dispatch.hxx> #include <svl/stritem.hxx> #include <sfx2/viewfrm.hxx> @@ -961,9 +962,10 @@ void SmEditWindow::Flush() SmViewShell *pViewSh = rCmdBox.GetView(); if (pViewSh) { + std::unique_ptr<SfxStringItem> pTextToFlush = o3tl::make_unique<SfxStringItem>(SID_TEXT, GetText()); pViewSh->GetViewFrame()->GetDispatcher()->ExecuteList( SID_TEXT, SfxCallMode::RECORD, - { new SfxStringItem(SID_TEXT, GetText()) }); + { pTextToFlush.get() }); } } if (aCursorMoveIdle.IsActive()) _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
