From: Hermet Park Date: Tue, 23 Jun 2020 08:38:59 +0000 (+0900) Subject: sw_engine stroke: initialize a missing variable. X-Git-Tag: accepted/tizen/unified/20200806.062539~95 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F18%2F236918%2F1;p=platform%2Fcore%2Fgraphics%2Ftizenvg.git sw_engine stroke: initialize a missing variable. Change-Id: I1c3d83d56045f592ff89a5462d4de494e50c9d34 --- diff --git a/src/lib/sw_engine/tvgSwStroke.cpp b/src/lib/sw_engine/tvgSwStroke.cpp index 8b6f1ce..94a2537 100644 --- a/src/lib/sw_engine/tvgSwStroke.cpp +++ b/src/lib/sw_engine/tvgSwStroke.cpp @@ -297,13 +297,11 @@ static void _inside(SwStroke& stroke, int32_t side, SwFixed lineLength) auto border = stroke.borders + side; auto theta = mathDiff(stroke.angleIn, stroke.angleOut) / 2; SwPoint delta; - bool intersect; + bool intersect = false; /* Only intersect borders if between two line_to's and both lines are long enough (line length is zero fur curves). */ - if (!border->movable || lineLength == 0) { - intersect = false; - } else { + if (border->movable && lineLength > 0) { //compute minimum required length of lines SwFixed minLength = abs(mathMultiply(stroke.width, mathTan(theta))); if (stroke.lineLength >= minLength && lineLength >= minLength) intersect = true;