diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-10-17 02:54:08 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-10-17 02:54:08 +0400 |
commit | b53505f5e11771b2e500fb9f812a4cd649a5d715 (patch) | |
tree | 1433bb8a00545559b085f331696bfe878daf3069 /source/blender/freestyle/intern/stroke/Chain.h | |
parent | 2d25a12bbdc4dde23810e23726b29841bf13c2cd (diff) |
Another attempt to fix the failure of SVertex::getFEdge due to a discontinuity
of underlying FEdges introduced by chaining operations. The material of a
smooth FEdge is identified by the material index of the FEdge and the array
of materials in the SShape to which the first SVertex (i.e., vertexA) of the
FEdge belong. The present fix makes sure that the material index refers to the
intended array of materials, to avoid inconsistent reference and out-of-index
errors that lead to a crash.
Diffstat (limited to 'source/blender/freestyle/intern/stroke/Chain.h')
-rwxr-xr-x | source/blender/freestyle/intern/stroke/Chain.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/freestyle/intern/stroke/Chain.h b/source/blender/freestyle/intern/stroke/Chain.h index 711ae16a1a0..0dc3dd21a28 100755 --- a/source/blender/freestyle/intern/stroke/Chain.h +++ b/source/blender/freestyle/intern/stroke/Chain.h @@ -42,13 +42,14 @@ class Chain : public Curve protected: // tmp Id * _splittingId; + FEdge *_fedgeB; // the last FEdge of the ViewEdge passed to the last call for push_viewedge_back(). public: /*! Defult constructor. */ - Chain() : Curve() {_splittingId=0;} + Chain() : Curve() {_splittingId=0;_fedgeB=0;} /*! Builds a chain from its Id. */ - Chain(const Id& id) : Curve(id) {_splittingId=0;} + Chain(const Id& id) : Curve(id) {_splittingId=0;_fedgeB=0;} /*! Copy Constructor */ - Chain(const Chain& iBrother) : Curve(iBrother) {_splittingId=iBrother._splittingId;} + Chain(const Chain& iBrother) : Curve(iBrother) {_splittingId=iBrother._splittingId;_fedgeB=iBrother._fedgeB;} /*! Destructor. */ virtual ~Chain() { // only the last splitted deletes this id |