diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-04-30 07:24:49 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-04-30 07:26:55 +0300 |
commit | 0eef9df3559f11128266638904762705cc4c5bc1 (patch) | |
tree | 18ebc49e785e77f543af5190dd207460303d89d3 /source/blender | |
parent | bf8962e442e51d76c0cdf669c3399bd0f83cd701 (diff) |
Fix missing NULL check in grease-pencil clear strokes
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c index 0c6b4ebf30c..c023c63ebc9 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c +++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c @@ -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) { |