Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonioya <blendergit@gmail.com>2018-12-15 11:36:08 +0300
committerAntonioya <blendergit@gmail.com>2018-12-15 11:36:08 +0300
commitb73529fafd63d4d8326001482f44e7eb578a5f77 (patch)
tree47479db3b81506b512d6f2985c4f157905f51252 /source/blender/editors/gpencil/gpencil_armature.c
parentba1f178c1c85fcc2140c11cd48ccbacb60827ae4 (diff)
GP: Add NULL checking for object
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_armature.c')
-rw-r--r--source/blender/editors/gpencil/gpencil_armature.c4
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) {