From: kgv Date: Tue, 27 Mar 2012 07:58:50 +0000 (+0400) Subject: 0022523: DRAWEXE randomly crashed on smooth navigation in 3D-Viewer X-Git-Tag: V6_5_3_beta1~7 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=476ed21f1b90ed3b50685ddc328eecc4a917d2d8;p=occt-copy.git 0022523: DRAWEXE randomly crashed on smooth navigation in 3D-Viewer Check vector modulus to avoid possible exceptions. --- diff --git a/src/NIS/NIS_View.cxx b/src/NIS/NIS_View.cxx index 7c4d644798..45f84111ee 100755 --- a/src/NIS/NIS_View.cxx +++ b/src/NIS/NIS_View.cxx @@ -550,6 +550,11 @@ void NIS_View::Select (const NCollection_List &thePolygon, // Compute transformation. const gp_XYZ anXdir (gp_XYZ(anX, anY, aZ) - anEye.XYZ()); + if (anXdir.Modulus() <= gp::Resolution()) + { + return; + } + const gp_Ax3 anAx3 (anEye, aProj, anXdir); gp_Trsf aTrf; aTrf.SetTransformation (anAx3);