]> SALOME platform Git repositories - plugins/netgenplugin.git/commitdiff
Salome HOME
Prevent division by zero in GetProgress()
authoreap <eap@opencascade.com>
Mon, 18 Nov 2013 15:56:48 +0000 (15:56 +0000)
committereap <eap@opencascade.com>
Mon, 18 Nov 2013 15:56:48 +0000 (15:56 +0000)
src/NETGENPlugin/NETGENPlugin_NETGEN_2D_ONLY.cxx

index 31b8aba2d4682b2f70b824ebef3858634cc6f831..ff27cce58cb06c0c10e80256b8e5d9ccf3ac3b1a 100644 (file)
@@ -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<NETGENPlugin_NETGEN_2D_ONLY*>( this )->_progressTic++;
     progress = Max( progress, _progressByTic * _progressTic );