summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2015-05-26 16:02:50 +0100
committerMichael Meeks <michael.meeks@collabora.com>2015-05-26 17:54:27 +0100
commitf849d96463d967214bc063f6de912a082272c395 (patch)
tree998470859b5f700db40084e89a257ec8a8b78999 /sdext
parent2a6aa95a7af11eb091dfa9494cd810998b2e324d (diff)
tdf#91416 - fix some incorrectly allocated VirtualDevices.
Change-Id: I9ebed313827986473c60e77b7e218b4c1b2487fe
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/wrapper/wrapper.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index aa0cf96a448b..4215163697e8 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -660,9 +660,9 @@ void Parser::readFont()
}
- static VirtualDevice* vDev = 0;
- if (vDev == 0)
- vDev = new VirtualDevice;
+ static VclPtr<VirtualDevice> vDev;
+ if (!vDev)
+ vDev = VclPtr<VirtualDevice>::Create();
vcl::Font font(aResult.familyName, Size(0, 1000));
vDev->SetFont(font);