starmath/source/ElementsDockingWindow.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 73e4009dc2a645b1bf9f06ce34711e135c147082 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Mon Apr 17 18:26:56 2023 +0300 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Tue Apr 18 05:17:49 2023 +0200 tdf#154016: use ScopedVclPtr A regression crash from commit d79c527c2a599c7821d27cf03b95cb79e2abe685 (Use IconView in SmElementsControl, 2022-06-01). Without disposeAndClear, the VirtualDevices leak; and on Windows this quickly leads to GDI handle 10 000 limit killing the process (which is good, helping to track this kind of issues). Change-Id: I28e1ffbeb425fae3fdbd76b7873fef5c929b8e11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150523 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> (cherry picked from commit c11463cdc5415707d05ab6da08736ff7212db4a0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150511 Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx index a52b5f85ec0f..a3a4085a7ea1 100644 --- a/starmath/source/ElementsDockingWindow.cxx +++ b/starmath/source/ElementsDockingWindow.cxx @@ -508,7 +508,7 @@ struct ElementData void SmElementsControl::addElement(const OUString& aElementVisual, const OUString& aElementSource, const OUString& aHelpText) { std::unique_ptr<SmNode> pNode = maParser->ParseExpression(aElementVisual); - VclPtr<VirtualDevice> pDevice(mpIconView->create_virtual_device()); + ScopedVclPtr<VirtualDevice> pDevice(mpIconView->create_virtual_device()); pDevice->SetTextRenderModeForResolutionIndependentLayout(true); pDevice->SetMapMode(MapMode(MapUnit::Map100thMM)); pDevice->SetDrawMode(DrawModeFlags::Default);