diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-07-18 16:24:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-07-18 16:28:40 +0100 |
commit | e271435c43a498933b80726c0ab2cff642467034 (patch) | |
tree | 107c663d7b1e550245aac8c9db0ceb087ade61cc /drawinglayer | |
parent | 5445de1432fd65fb3ef613d1dafd2bbb9b99b265 (diff) |
coverity#1415515 Division or modulo by float zero
and
coverity#1415513 Division or modulo by float zero
Change-Id: I91ffc794e70f9204a39a5ae1b2a6c59ecbe31adf
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/tools/emfphelperdata.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
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. |