GPencil: Fix unreported memory leak in Fill inverse

There was a memory leak when use inverted fill.
This commit is contained in:
Antonio Vazquez 2022-09-28 19:36:15 +02:00 committed by Philipp Oeser
parent 6c3364052b
commit 662ba67210
Notes: blender-bot 2023-02-13 13:22:31 +01:00
Referenced by issue #100749, Blender LTS: Maintenance Task 3.3
1 changed files with 3 additions and 0 deletions

View File

@ -2071,9 +2071,12 @@ static bool gpencil_find_and_mark_empty_areas(tGPDfill *tgpf)
get_pixel(ibuf, i, rgba);
if (rgba[3] == 0.0f) {
set_pixel(ibuf, i, blue_col);
BKE_image_release_ibuf(tgpf->ima, ibuf, NULL);
return true;
}
}
BKE_image_release_ibuf(tgpf->ima, ibuf, NULL);
return false;
}