Fix #135776: Grease Pencil: Average Color tool can create uninitialized values

The average color was not initialized leading to non-sensible values.
Now we initialize it to zeros.

Pull Request: https://projects.blender.org/blender/blender/pulls/135779
This commit is contained in:
Aleš Jelovčan
2025-03-11 11:49:49 +01:00
committed by Falk David
parent b613be2713
commit dbe7078d07

View File

@@ -45,7 +45,7 @@ void VertexAverageOperation::on_stroke_extended(const bContext &C,
const bool do_fill = do_vertex_color_fill(brush);
/* Compute the average color under the brush. */
float3 average_color;
float3 average_color(0.0f);
int color_count = 0;
this->foreach_editable_drawing(C, [&](const GreasePencilStrokeParams &params) {
IndexMaskMemory memory;