[Libreoffice-commits] core.git: drawinglayer/source

Caolán McNamara caolanm at redhat.com
Tue Jul 18 15:29:27 UTC 2017


 drawinglayer/source/tools/emfphelperdata.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit e271435c43a498933b80726c0ab2cff642467034
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Jul 18 16:24:03 2017 +0100

    coverity#1415515 Division or modulo by float zero
    
    and
    
    coverity#1415513 Division or modulo by float zero
    
    Change-Id: I91ffc794e70f9204a39a5ae1b2a6c59ecbe31adf

diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx
index e4f3e3ce7322..a648117982ff 100644
--- a/drawinglayer/source/tools/emfphelperdata.cxx
+++ b/drawinglayer/source/tools/emfphelperdata.cxx
@@ -291,6 +291,11 @@ namespace emfplushelper
 
     void EmfPlusHelperData::mappingChanged()
     {
+        if (mnPixX == 0 || mnPixY == 0)
+        {
+            SAL_WARN("cppcanvas.emf", "dimensions in pixels is 0");
+            return;
+        }
         // Call when mnMmX/mnMmY/mnPixX/mnPixY/mnFrameLeft/mnFrameTop/maWorldTransform/ changes.
         // Currently not used are mnHDPI/mnVDPI/mnFrameRight/mnFrameBottom. *If* these should
         // be used in the future, this method will need to be called.


More information about the Libreoffice-commits mailing list