Fix uninitialized read in Qt Quick Shapes
Found when running valgrind on tests/auto/quick/examples: In QQuickShapeGenericRenderer::setFillColor() and QQuickShapeGenericRenderer::setStrokeColor() we read the current color's alpha value for a dirty flag. When no color had yet been set, this value was uninitialized. Change-Id: I3826030619b048058e866ca7b04aac64828293b7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
parent
d0cb311e0d
commit
8b022182d2
|
@ -97,8 +97,8 @@ private:
|
|||
struct ShapePathData {
|
||||
float strokeWidth;
|
||||
QPen pen;
|
||||
Color4ub strokeColor;
|
||||
Color4ub fillColor;
|
||||
Color4ub strokeColor = { uchar(0), uchar(0), uchar(0), uchar(0) };
|
||||
Color4ub fillColor = { uchar(0), uchar(0), uchar(0), uchar(0) };
|
||||
Qt::FillRule fillRule;
|
||||
QPainterPath path;
|
||||
FillGradientType fillGradientActive;
|
||||
|
|
Loading…
Reference in New Issue