diff options
author | Antonioya <blendergit@gmail.com> | 2018-09-26 16:49:46 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-09-26 16:49:46 +0300 |
commit | 310f1b057926d6250adf11db6621f2606b61827f (patch) | |
tree | 0c05ae9de990a79a3e1020c9babf6117b6ac53b4 /source/blender/editors/gpencil/gpencil_data.c | |
parent | 81a7d3cd0729f204316fd82fdb64932befe0e9ff (diff) |
GP: Fix unreported change material operator error
The first material of the list could not be assigned.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_data.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_data.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c index 07bb0141e95..7932f6308a6 100644 --- a/source/blender/editors/gpencil/gpencil_data.c +++ b/source/blender/editors/gpencil/gpencil_data.c @@ -1371,7 +1371,7 @@ static int gp_stroke_change_color_exec(bContext *C, wmOperator *op) } /* try to find slot */ int idx = BKE_gpencil_get_material_index(ob, ma) - 1; - if (idx <= 0) { + if (idx < 0) { return OPERATOR_CANCELLED; } |