drawinglayer/source/tools/emfphelperdata.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-)
New commits: commit 2634200a15c42e45edcaaaeac81243c67ded3ad1 Author: Caolán McNamara <caol...@redhat.com> Date: Mon Mar 26 12:14:23 2018 +0100 forcepoint #32 survive missing emf paths Change-Id: Ic27c3bbac12f66b30ff2f30f558180127cc73a51 Reviewed-on: https://gerrit.libreoffice.org/51873 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx index a5dda5d2ad96..09c3a2854aab 100644 --- a/drawinglayer/source/tools/emfphelperdata.cxx +++ b/drawinglayer/source/tools/emfphelperdata.cxx @@ -938,7 +938,11 @@ namespace emfplushelper rMS.ReadUInt32(brushIndexOrColor); SAL_INFO("drawinglayer", "EMF+ FillPath slot: " << index); - EMFPPlusFillPolygon(static_cast<EMFPPath*>(maEMFPObjects[index].get())->GetPolygon(*this), flags & 0x8000, brushIndexOrColor); + EMFPPath* path = static_cast<EMFPPath*>(maEMFPObjects[index].get()); + if (path) + EMFPPlusFillPolygon(path->GetPolygon(*this), flags & 0x8000, brushIndexOrColor); + else + SAL_WARN("drawinglayer", "EmfPlusRecordTypeFillPath missing path"); } break; case EmfPlusRecordTypeFillRegion: @@ -1061,10 +1065,12 @@ namespace emfplushelper rMS.ReadUInt32(penIndex); SAL_INFO("drawinglayer", "EMF+ DrawPath"); SAL_INFO("drawinglayer", "EMF+\tpen: " << penIndex); - EMFPPath* path = static_cast<EMFPPath*>(maEMFPObjects[flags & 0xff].get()); - SAL_WARN_IF(!path, "drawinglayer", "EmfPlusRecordTypeDrawPath missing path"); - EMFPPlusDrawPolygon(path->GetPolygon(*this), penIndex); + EMFPPath* path = static_cast<EMFPPath*>(maEMFPObjects[flags & 0xff].get()); + if (path) + EMFPPlusDrawPolygon(path->GetPolygon(*this), penIndex); + else + SAL_WARN("drawinglayer", "EmfPlusRecordTypeDrawPath missing path"); break; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits