ofz#3834 Divide-by-zero

Change-Id: I654152b964c6228efeb8b7cc7203064338fd1dd6
Reviewed-on: https://gerrit.libreoffice.org/43934
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2017-10-27 09:16:33 +01:00
parent ab60b88390
commit 1f0e40db86

View File

@@ -404,6 +404,12 @@ void CGM::ImplSetMapMode()
else
mbAngReverse = false;
if (mnVDCdy == 0.0 || mnOutdy == 0.0)
{
mbStatus = false;
return;
}
double fQuo1 = mnVDCdx / mnVDCdy;
double fQuo2 = mnOutdx / mnOutdy;
if ( fQuo2 < fQuo1 )