From 476ed21f1b90ed3b50685ddc328eecc4a917d2d8 Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 27 Mar 2012 11:58:50 +0400 Subject: [PATCH] 0022523: DRAWEXE randomly crashed on smooth navigation in 3D-Viewer Check vector modulus to avoid possible exceptions. --- src/NIS/NIS_View.cxx | 5 +++++ 1 file changed, 5 insertions(+) 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);