Kaydet (Commit) 1ed46f6c authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1078539 Division or modulo by zero

Change-Id: Ifbe3cbd8fa93ee828ed95c19893c52b8134d3fd1
üst 683ecd28
......@@ -383,6 +383,9 @@ void IMapCircleObject::Scale( const Fraction& rFracX, const Fraction& rFracY )
SCALEPOINT( aCenter, rFracX, rFracY );
}
if (!aAverage.GetDenominator())
throw std::runtime_error("divide by zero");
nRadius = ( nRadius * aAverage.GetNumerator() ) / aAverage.GetDenominator();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment