summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-05-14 00:35:21 +0200
committerAndras Timar <andras.timar@collabora.com>2017-05-16 10:16:39 +0200
commite24a0a4d79707722ff59bafa168e8b2d851b3c27 (patch)
tree71b68f0326fdf141296d07e4341a39033b50ddb7 /cui
parentda608e10855b8b2af22db147e8b67db447c83ac8 (diff)
fix gdi resource leak with unreleased virtual device
(copycat Markus https://cgit.freedesktop.org/libreoffice/core/commit/?id=289711c2a469bfbe06aef3b3870b65f9c788f56d) Change-Id: I3974609559dd44257d7c3e9e9544348d622953f6 Reviewed-on: https://gerrit.libreoffice.org/37586 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 11c4cc15fdd491e15ffd4e7d9fb5d4082898f926) Reviewed-on: https://gerrit.libreoffice.org/37591 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 6eb0df62aaa00f2c1508b1650e8df3145822f84f)
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optchart.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/cui/source/options/optchart.cxx b/cui/source/options/optchart.cxx
index 060d3b0b6587..b4eb31b072d1 100644
--- a/cui/source/options/optchart.cxx
+++ b/cui/source/options/optchart.cxx
@@ -43,7 +43,7 @@ void SvxDefaultColorOptPage::InsertColorEntry(const XColorEntry& rEntry, sal_Int
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
Size aImageSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize();
- VclPtr<VirtualDevice> xDevice = VclPtr<VirtualDevice>::Create();
+ ScopedVclPtrInstance<VirtualDevice> xDevice;
xDevice->SetOutputSize(aImageSize);
const Rectangle aRect(Point(0, 0), aImageSize);
xDevice->SetFillColor(rColor);