[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - drawinglayer/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Aug 20 10:18:08 UTC 2018


 drawinglayer/source/tools/emfphelperdata.cxx |   13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

New commits:
commit e16f22b75f84695c58d6612be27364cc5814f51f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 13 17:22:43 2018 +0100
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Aug 20 12:17:48 2018 +0200

    ofz: Null-deference
    
    Change-Id: I339cfb54379b1c98a04747046ed599a23d49c220
    Reviewed-on: https://gerrit.libreoffice.org/58950
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index c529c255beb1..a5b31b1b4ebe 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -1665,8 +1665,13 @@ namespace emfplushelper
                         SAL_INFO("drawinglayer", "EMF+ SetClipPath combine mode: " << combineMode);
                         SAL_INFO("drawinglayer", "EMF+\tpath in slot: " << (flags & 0xff));
 
-                        EMFPPath& path = *static_cast<EMFPPath*>(maEMFPObjects[flags & 0xff].get());
-                        ::basegfx::B2DPolyPolygon& clipPoly(path.GetPolygon(*this));
+                        EMFPPath *path = static_cast<EMFPPath*>(maEMFPObjects[flags & 0xff].get());
+                        if (!path)
+                        {
+                            break;
+                        }
+
+                        ::basegfx::B2DPolyPolygon& clipPoly(path->GetPolygon(*this));
                         // clipPoly.transform(rState.mapModeTransform);
 
                         HandleNewClipRegion( combineClip(mrPropertyHolders.Current().getClipPolyPolygon(), combineMode, clipPoly), mrTargetHolders, mrPropertyHolders);
@@ -1678,6 +1683,10 @@ namespace emfplushelper
                         SAL_INFO("drawinglayer", "EMF+ SetClipRegion");
                         SAL_INFO("drawinglayer", "EMF+\tregion in slot: " << (flags & 0xff) << " combine mode: " << combineMode);
                         EMFPRegion *region = static_cast<EMFPRegion*>(maEMFPObjects[flags & 0xff].get());
+                        if (!region)
+                        {
+                            break;
+                        }
 
                         HandleNewClipRegion(combineClip(mrPropertyHolders.Current().getClipPolyPolygon(), combineMode, region->regionPolyPolygon), mrTargetHolders, mrPropertyHolders);
                         break;


More information about the Libreoffice-commits mailing list