coverity#735616 Division or modulo by float zero

Change-Id: I5aaad2cd80e6930cbca57b4df2bfee3a6989ca41
This commit is contained in:
Caolán McNamara
2014-06-10 10:20:53 +01:00
parent d7cd613067
commit ea93714e94

View File

@@ -90,7 +90,7 @@ void SdDocPreviewWin::CalcSizeAndPos( GDIMetaFile* pFile, Size& rSize, Point& rP
if( nHeight < 0 ) nHeight = 0;
double dRatio=((double)aTmpSize.Width())/aTmpSize.Height();
double dRatioPreV=((double) nWidth ) / nHeight;
double dRatioPreV = nHeight ? (((double) nWidth ) / nHeight) : 0.0;
if (dRatio > dRatioPreV)
{