diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-03-31 17:17:31 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-03-31 17:17:31 +0300 |
commit | 23bd6cff81464994b635e9daf33d57ec32055a31 (patch) | |
tree | a98efdf99cbfb2b13e7ae3c330f0f58bc52d50e2 /source | |
parent | d55d4fee30c772f3dca0376ad95351d4e2be6478 (diff) |
GPencil: Avoid LineArt modifier uses negative material index
In some situations the material index could be negative, and this is wrong.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c index 7fb3981d9dc..2389e0c403c 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c +++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c @@ -3858,7 +3858,7 @@ static void lineart_gpencil_generate(LineartRenderBuffer *rb, BKE_gpencil_stroke_add_points(gps, stroke_data, count, mat); BKE_gpencil_dvert_ensure(gps); - gps->mat_nr = material_nr; + gps->mat_nr = max_ii(material_nr, 0); MEM_freeN(stroke_data); |