GP: Fix unreported change material operator error

The first material of the list could not be assigned.
This commit is contained in:
Antonioya 2018-09-26 15:49:46 +02:00
parent 81a7d3cd07
commit 310f1b0579
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}