[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - cppcanvas/source
Caolán McNamara
caolanm at redhat.com
Thu Apr 5 14:24:25 UTC 2018
cppcanvas/source/mtfrenderer/emfplus.cxx | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
New commits:
commit 6ec045e846d49d60975cb4eb41f81e46652a0070
Author: Caolán McNamara <caolanm at 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/51876
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/cppcanvas/source/mtfrenderer/emfplus.cxx b/cppcanvas/source/mtfrenderer/emfplus.cxx
index 8cfd1127540e..923099b0c056 100644
--- a/cppcanvas/source/mtfrenderer/emfplus.cxx
+++ b/cppcanvas/source/mtfrenderer/emfplus.cxx
@@ -1003,7 +1003,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:
@@ -1128,9 +1133,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;
}
More information about the Libreoffice-commits
mailing list