[Bf-blender-cvs] [ef1e511] master: Another attempt to fully fix T40020: Freestyle: dashed lines crashes blender.

Tamito Kajiyama noreply at git.blender.org
Mon May 5 15:31:07 CEST 2014


Commit: ef1e511bb6caaca940f603fa41e1801f842f150b
Author: Tamito Kajiyama
Date:   Mon May 5 22:30:00 2014 +0900
https://developer.blender.org/rBef1e511bb6caaca940f603fa41e1801f842f150b

Another attempt to fully fix T40020: Freestyle: dashed lines crashes blender.

Problem report by flokkievids through rB047c3aa728a4bb944616a084805988714b796d52#1.
Thanks!

===================================================================

M	source/blender/freestyle/intern/stroke/StrokeRep.cpp

===================================================================

diff --git a/source/blender/freestyle/intern/stroke/StrokeRep.cpp b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
index 4eee050..cd5a4bf 100644
--- a/source/blender/freestyle/intern/stroke/StrokeRep.cpp
+++ b/source/blender/freestyle/intern/stroke/StrokeRep.cpp
@@ -552,7 +552,7 @@ void Strip::computeTexCoordWithTips (const vector<StrokeVertex*>& iStrokeVertice
 			uPrev = u;
 		}
 
-		if (i >= 2) {
+		if (v != vend && i >= 2) {
 			// first transition vertex
 			if (fabs(u - uPrev) > ZERO)
 				t = (0.25 - uPrev) / (u - uPrev);
@@ -608,7 +608,7 @@ void Strip::computeTexCoordWithTips (const vector<StrokeVertex*>& iStrokeVertice
 	}
 
 	if (tipEnd) {
-		if (i >= 2) {
+		if (v != vend && i >= 2) {
 			// second transition vertex
 			if (fabs(u - uPrev) > ZERO)
 				t = (float(tiles) - uPrev) / (u - uPrev);




More information about the Bf-blender-cvs mailing list