From: eap Date: Mon, 18 Nov 2013 15:56:48 +0000 (+0000) Subject: Prevent division by zero in GetProgress() X-Git-Tag: V7_3_0a1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4280b9f4db542da7ba7deb00d9a2345291095bfd;p=plugins%2Fnetgenplugin.git Prevent division by zero in GetProgress() --- diff --git a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx index 31b8aba..ff27cce 100644 --- a/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx +++ b/src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx @@ -436,7 +436,7 @@ double NETGENPlugin_NETGEN_2D_ONLY::GetProgress() const if ( _progressByTic < 0 ) { NETGENPlugin_NETGEN_2D_ONLY* me = (NETGENPlugin_NETGEN_2D_ONLY*) this; - me->_progressByTic = 0.25 / _progressTic; + me->_progressByTic = 0.25 / (_progressTic+1); } const_cast( this )->_progressTic++; progress = Max( progress, _progressByTic * _progressTic );