forked from bartvdbraak/blender
Fix access violation when painting with tiled textured brushes +
airbrush + small brush size. Fast textured strokes meant that sometimes the update width (calculated from stroke distance) would be greater than the new ibuf width. This meant out of bounds access for the new ibuf. It's totally strange that I couldn't reproduce this issue on older versions since the logic here has not really changed much between versions.
This commit is contained in:
parent
c80e9866c8
commit
f622691691
@ -491,8 +491,8 @@ static void brush_painter_imbuf_partial_update(BrushPainter *painter, const floa
|
|||||||
w = h = 0;
|
w = h = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
x1 = destx;
|
x1 = min_ii(destx, ibuf->x);
|
||||||
y1 = desty;
|
y1 = min_ii(desty, ibuf->y);
|
||||||
x2 = min_ii(destx + w, ibuf->x);
|
x2 = min_ii(destx + w, ibuf->x);
|
||||||
y2 = min_ii(desty + h, ibuf->y);
|
y2 = min_ii(desty + h, ibuf->y);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user