[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54111] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/winged_edge/Curvature.cpp: Fix for a crash in curvature calculation due to a WVertex with no associated edges .

Tamito Kajiyama rd6t-kjym at asahi-net.or.jp
Sat Jan 26 19:53:16 CET 2013


Revision: 54111
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54111
Author:   kjym3
Date:     2013-01-26 18:53:16 +0000 (Sat, 26 Jan 2013)
Log Message:
-----------
Fix for a crash in curvature calculation due to a WVertex with no associated edges.
(TODO: identify the reason why such a strange WVertex is generated.)
Problem report by Vicente Carro with a .blend for reproducing the issue.  Thanks a lot!

Modified Paths:
--------------
    branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/Curvature.cpp

Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/Curvature.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/Curvature.cpp	2013-01-26 17:38:45 UTC (rev 54110)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/winged_edge/Curvature.cpp	2013-01-26 18:53:16 UTC (rev 54111)
@@ -586,8 +586,14 @@
 // use marking ? (measure *timings* ...)
 void compute_curvature_tensor(WVertex *start, real radius, NormalCycle& nc)
 {
+	// TODO: for some reason, the WVertex 'start' may have no associated edges
+	// (i.e., WVertex::_EdgeList is empty), which causes a crash due to a call
+	// of WVertex::_EdgeList.front().
+	if (start->GetEdges().empty())
+		return;
+
 	// in case we have a non-manifold vertex, skip it...
-	if(start->isBoundary())
+	if (start->isBoundary())
 		return;
 
 	std::set<WVertex*> vertices;




More information about the Bf-blender-cvs mailing list