diff options
author | Antonioya <blendergit@gmail.com> | 2018-12-15 11:36:08 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-12-15 11:36:08 +0300 |
commit | b73529fafd63d4d8326001482f44e7eb578a5f77 (patch) | |
tree | 47479db3b81506b512d6f2985c4f157905f51252 /source/blender | |
parent | ba1f178c1c85fcc2140c11cd48ccbacb60827ae4 (diff) |
GP: Add NULL checking for object
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_armature.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/gpencil/gpencil_armature.c b/source/blender/editors/gpencil/gpencil_armature.c index d554a6bd7f2..21715d7ba93 100644 --- a/source/blender/editors/gpencil/gpencil_armature.c +++ b/source/blender/editors/gpencil/gpencil_armature.c @@ -491,6 +491,10 @@ bool ED_gpencil_add_armature_weights( Main *bmain = CTX_data_main(C); Scene *scene = CTX_data_scene(C); + if (ob == NULL) { + return false; + } + /* if no armature modifier, add a new one */ GpencilModifierData *md = BKE_gpencil_modifiers_findByType(ob, eGpencilModifierType_Armature); if (md == NULL) { |