diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-12-07 01:17:19 +0300 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-12-07 01:17:19 +0300 |
commit | 643b73e60ee51aa9f342f246c3e340eefe017516 (patch) | |
tree | b1a86b374e2977065a460ed3983843006dc4ff7e /source/blender/freestyle/intern/stroke | |
parent | 8a2eb1f590c40cc9831d46d95434d9a63f31629b (diff) |
* Fix for a freeze issue in stroke rendering when using round/square caps.
The problem was caused by a stroke with only one vertex. Such a stroke was
generated when for some unknown reason a chained curve consisted of only
two vertices such that their 3D positions were exactly or almost the same.
* Fix for the Parameter Editor mode that failed when scene render layers
and/or linesets contain a single quote in their names.
Diffstat (limited to 'source/blender/freestyle/intern/stroke')
-rwxr-xr-x | source/blender/freestyle/intern/stroke/Operators.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/stroke/Operators.cpp b/source/blender/freestyle/intern/stroke/Operators.cpp index ea996c67785..4f6fb08fa0e 100755 --- a/source/blender/freestyle/intern/stroke/Operators.cpp +++ b/source/blender/freestyle/intern/stroke/Operators.cpp @@ -979,6 +979,11 @@ Stroke* createStroke(Interface1D& inter) { stroke->push_back(stroke_vertex); } } + // Discard the stroke if the number of stroke vertices is less than two + if (stroke->strokeVerticesSize() < 2) { + delete stroke; + return NULL; + } stroke->setLength(currentCurvilignAbscissa); return stroke; } |