Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-01-26 22:53:16 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-01-26 22:53:16 +0400
commit7ae0c936fa070da0bf10782e77c4500bf9bd57a8 (patch)
treed1fe81d857919409f43fa5e68c3299ee509326ab /source/blender/freestyle/intern/winged_edge/Curvature.cpp
parent7f721d06aaf48dd543441f4022c5c59fda0d13b8 (diff)
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!
Diffstat (limited to 'source/blender/freestyle/intern/winged_edge/Curvature.cpp')
-rw-r--r--source/blender/freestyle/intern/winged_edge/Curvature.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/freestyle/intern/winged_edge/Curvature.cpp b/source/blender/freestyle/intern/winged_edge/Curvature.cpp
index acefe1aa5fc..65ebdeac3a8 100644
--- a/source/blender/freestyle/intern/winged_edge/Curvature.cpp
+++ b/source/blender/freestyle/intern/winged_edge/Curvature.cpp
@@ -586,8 +586,14 @@ static bool sphere_clip_vector(const Vec3r& O, real r, const Vec3r& P, Vec3r& V)
// 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;