Avoid some division by zero
commite1fe04f117030400f07d207e0a3e35161ac464fa
authorStephan Bergmann <sbergman@redhat.com>
Thu, 29 Jul 2021 07:48:45 +0000 (29 09:48 +0200)
committerStephan Bergmann <sbergman@redhat.com>
Thu, 29 Jul 2021 08:58:06 +0000 (29 10:58 +0200)
tree0a98c0f493899857b2f978bed9efe095240b02de
parent6f8f757c7338dd890273235bae6917b3175e2f86
Avoid some division by zero

The first of which was seen when running under UBSan `instdir/program/soffice
--headless --convert-to pdf` of caolan/id:002485,src:002216,op:havoc,rep:8.jpg
from the crash-testing corpus.  The second one (when computing nGrfDPIy) was not
observed, but lets assume that it could happen just as well, and keep the code
symmetric.

Change-Id: Idf9f9a84f3b05c7cfe3c66db753c73d2cbf812be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119650
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
vcl/source/gdi/graph.cxx