[Bf-blender-cvs] [b73529fafd6] blender2.8: GP: Add NULL checking for object
Antonioya
noreply at git.blender.org
Sat Dec 15 09:38:52 CET 2018
Commit: b73529fafd63d4d8326001482f44e7eb578a5f77
Author: Antonioya
Date: Sat Dec 15 09:36:08 2018 +0100
Branches: blender2.8
https://developer.blender.org/rBb73529fafd63d4d8326001482f44e7eb578a5f77
GP: Add NULL checking for object
===================================================================
M source/blender/editors/gpencil/gpencil_armature.c
===================================================================
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) {
More information about the Bf-blender-cvs
mailing list