summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-26 12:14:23 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2019-08-27 14:12:26 +0200
commitc3059deb0ace3a3f8b972c6a45e6694628e1d7c4 (patch)
tree22361fbcc851499d2159b997a1938b8343ff7979
parent4d44349476bce624ef16492193b79f6437f4d952 (diff)
forcepoint #32 survive missing emf paths
Change-Id: Ic27c3bbac12f66b30ff2f30f558180127cc73a51 Reviewed-on: https://gerrit.libreoffice.org/51876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--cppcanvas/source/mtfrenderer/emfplus.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 6ad81dd0369a..86eede74cf98 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1989,7 +1989,12 @@ namespace cppcanvas
SAL_INFO("cppcanvas.emf", "EMF+ FillPath slot: " << index);
- EMFPPlusFillPolygon( static_cast<EMFPPath*>( aObjects [index])->GetPolygon (*this), rFactoryParms, rState, rCanvas, flags & 0x8000, brushIndexOrColor);
+ EMFPPath* path = static_cast<EMFPPath*>(aObjects[index]);
+ if (path)
+ EMFPPlusFillPolygon(path->GetPolygon (*this), rFactoryParms, rState, rCanvas, flags & 0x8000, brushIndexOrColor);
+ else
+ SAL_WARN("cppcanvas.emf", "EmfPlusRecordTypeFillPath missing path");
+
}
break;
case EmfPlusRecordTypeDrawEllipse:
@@ -2112,9 +2117,10 @@ namespace cppcanvas
SAL_INFO("cppcanvas.emf", "EMF+\tpen: " << penIndex);
EMFPPath* path = static_cast<EMFPPath*>( aObjects [flags & 0xff] );
- SAL_WARN_IF( !path, "cppcanvas.emf", "EmfPlusRecordTypeDrawPath missing path" );
-
- EMFPPlusDrawPolygon (path->GetPolygon (*this), rFactoryParms, rState, rCanvas, penIndex);
+ if (path)
+ EMFPPlusDrawPolygon(path->GetPolygon (*this), rFactoryParms, rState, rCanvas, penIndex);
+ else
+ SAL_WARN("cppcanvas.emf", "EmfPlusRecordTypeDrawPath missing path");
break;
}