Fix missing NULL check in grease-pencil clear strokes

This commit is contained in:
Campbell Barton 2021-04-30 14:24:49 +10:00
parent bf8962e442
commit 0eef9df355
1 changed files with 2 additions and 1 deletions

View File

@ -364,7 +364,8 @@ static int lineart_gpencil_bake_strokes_commom_modal(bContext *C,
static void lineart_gpencil_clear_strokes_exec_common(Object *ob)
{
if (ob->type != OB_GPENCIL) {
/* TODO: move these checks to an operator poll function. */
if ((ob == NULL) || ob->type != OB_GPENCIL) {
return;
}
LISTBASE_FOREACH (GpencilModifierData *, md, &ob->greasepencil_modifiers) {