diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-05-13 23:39:16 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-05-16 10:16:38 +0200 |
commit | f4585e24be0f49e896ae54c7b270de33e40f4f65 (patch) | |
tree | 4ec83e71f26bcb6de2cf0fea441c98e2731d628b /svx | |
parent | 97a12d7463f1e0ed0e381f3d750b21d0a60be41e (diff) |
fix gdi resource leak with unreleased virtual device
Change-Id: I1fd8c76a206cfc940e3d646e4025618785985e52
Reviewed-on: https://gerrit.libreoffice.org/37583
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit 289711c2a469bfbe06aef3b3870b65f9c788f56d)
Reviewed-on: https://gerrit.libreoffice.org/37585
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
(cherry picked from commit e4fdaa5d9a7b0c507278ef70aab7ce4c9e7ee62d)
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 4c93b9bba0b5..95ec9f400143 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -3267,7 +3267,7 @@ void SvxColorListBox::ShowPreview(const NamedColor &rColor) 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); if (m_bShowNoneButton && rColor.first == COL_NONE_COLOR) |