projects
/
occt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
fadcea2
)
0022523: DRAWEXE randomly crashed on smooth navigation in 3D-Viewer
author
kgv
<kgv@opencascade.com>
Tue, 27 Mar 2012 07:58:50 +0000
(11:58 +0400)
committer
kgv
<kgv@opencascade.com>
Thu, 29 Mar 2012 15:22:34 +0000
(19:22 +0400)
Check vector modulus to avoid possible exceptions.
src/NIS/NIS_View.cxx
patch
|
blob
|
blame
|
history
diff --git
a/src/NIS/NIS_View.cxx
b/src/NIS/NIS_View.cxx
index
7c4d644
..
45f8411
100755
(executable)
--- a/
src/NIS/NIS_View.cxx
+++ b/
src/NIS/NIS_View.cxx
@@
-550,6
+550,11
@@
void NIS_View::Select (const NCollection_List<gp_XY> &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);