[Lemon-commits] hegyi: r3192 - glemon/trunk
Lemon SVN
svn at lemon.cs.elte.hu
Tue Feb 20 16:46:19 CET 2007
Author: hegyi
Date: Tue Feb 20 16:46:19 2007
New Revision: 3192
Modified:
glemon/trunk/gdc-broken_edge.cc
Log:
No segmentation fault will be occured if two nodes are exactly overlap each other, AND they are connected.
Modified: glemon/trunk/gdc-broken_edge.cc
==============================================================================
--- glemon/trunk/gdc-broken_edge.cc (original)
+++ glemon/trunk/gdc-broken_edge.cc Tue Feb 20 16:46:19 2007
@@ -93,7 +93,10 @@
XY unit_vector_in_dir(head-center);
double length=sqrt( unit_vector_in_dir.normSquare() );
- unit_vector_in_dir/=length;
+ if(length!=0)
+ {
+ unit_vector_in_dir/=length;
+ }
// update the arrow
drawArrow(unit_vector_in_dir);
More information about the Lemon-commits
mailing list