[Bf-blender-cvs] [0eef9df3559] blender-v2.93-release: Fix missing NULL check in grease-pencil clear strokes

Campbell Barton noreply at git.blender.org
Fri Apr 30 07:09:03 CEST 2021


Commit: 0eef9df3559f11128266638904762705cc4c5bc1
Author: Campbell Barton
Date:   Fri Apr 30 14:24:49 2021 +1000
Branches: blender-v2.93-release
https://developer.blender.org/rB0eef9df3559f11128266638904762705cc4c5bc1

Fix missing NULL check in grease-pencil clear strokes

===================================================================

M	source/blender/gpencil_modifiers/intern/lineart/lineart_ops.c

===================================================================

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) {



More information about the Bf-blender-cvs mailing list