summaryrefslogtreecommitdiffstats
path: root/sdext/source/pdfimport/wrapper/wrapper.cxx
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/source/pdfimport/wrapper/wrapper.cxx
parentResolves: tdf#91542 crash on pressing return in sidebar line popup (diff)
downloadcore-f849d96463d967214bc063f6de912a082272c395.tar.gz
core-f849d96463d967214bc063f6de912a082272c395.zip
tdf#91416 - fix some incorrectly allocated VirtualDevices.
Change-Id: I9ebed313827986473c60e77b7e218b4c1b2487fe
Diffstat (limited to 'sdext/source/pdfimport/wrapper/wrapper.cxx')
-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);