# HG changeset patch # User hegyi # Date 1171986379 0 # Node ID 8b69c54d5bf0d5c867ebbf632bf2103e4f9711f9 # Parent c1c9fcf03e9471b4643f0b7862a2e2f114f7e4e8 No segmentation fault will be occured if two nodes are exactly overlap each other, AND they are connected. diff -r c1c9fcf03e94 -r 8b69c54d5bf0 gdc-broken_edge.cc --- a/gdc-broken_edge.cc Sat Feb 03 12:43:01 2007 +0000 +++ b/gdc-broken_edge.cc Tue Feb 20 15:46:19 2007 +0000 @@ -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);