summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-26 12:49:54 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-03-26 21:28:06 +0200
commit8ce700ebd84b8ccd5db461729a1c0fac8ad19baf (patch)
tree0ef4043b559b5827ded3060cc6fafd8775bf8603 /drawinglayer
parent78a43ceeca45f42d674bbf8b5c95a108ebc6590c (diff)
forcepoint #33 ensure payload is a EMFPPath
Change-Id: I0a9f332cc66e43caa4e1611006fa765cad063539 Reviewed-on: https://gerrit.libreoffice.org/51889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/tools/emfphelperdata.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index 09c3a2854aab..679a47c1a7f3 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -938,7 +938,7 @@ namespace emfplushelper
rMS.ReadUInt32(brushIndexOrColor);
SAL_INFO("drawinglayer", "EMF+ FillPath slot: " << index);
- EMFPPath* path = static_cast<EMFPPath*>(maEMFPObjects[index].get());
+ EMFPPath* path = dynamic_cast<EMFPPath*>(maEMFPObjects[index].get());
if (path)
EMFPPlusFillPolygon(path->GetPolygon(*this), flags & 0x8000, brushIndexOrColor);
else
@@ -1066,7 +1066,7 @@ namespace emfplushelper
SAL_INFO("drawinglayer", "EMF+ DrawPath");
SAL_INFO("drawinglayer", "EMF+\tpen: " << penIndex);
- EMFPPath* path = static_cast<EMFPPath*>(maEMFPObjects[flags & 0xff].get());
+ EMFPPath* path = dynamic_cast<EMFPPath*>(maEMFPObjects[flags & 0xff].get());
if (path)
EMFPPlusDrawPolygon(path->GetPolygon(*this), penIndex);
else