Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-10-12 02:22:05 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-12 02:22:05 +0300
commitbbca6af6a5aac08fa15da3f15de650e441dce269 (patch)
tree69a10e25e479503d17ba138a8f75280078918eed /source/blender
parent08ac0153609c6934935f2385871affea17b0bb72 (diff)
Fix crash in grease pencil fill
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/gpencil/gpencil_fill.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 8acd79ba7d9..61a21022e22 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -636,7 +636,7 @@ static void gpencil_get_outline_points(tGPDfill *tgpf)
bool start_found = false;
const int NEIGHBOR_COUNT = 8;
- int offset[8][2] = {
+ const int offset[8][2] = {
{ -1, -1 },
{ 0, -1 },
{ 1, -1 },
@@ -653,7 +653,7 @@ static void gpencil_get_outline_points(tGPDfill *tgpf)
int imagesize = ibuf->x * ibuf->y;
/* find the initial point to start outline analysis */
- for (int idx = imagesize; idx >= 0; idx--) {
+ for (int idx = imagesize - 1; idx != 0; idx--) {
get_pixel(ibuf, idx, rgba);
if (rgba[1] == 1.0f) {
boundary_co[0] = idx % ibuf->x;