diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-10-11 19:55:26 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-10-11 19:55:26 +0300 |
commit | 4bb8a3c111d022d615fa37916d862a6cbc7dedf7 (patch) | |
tree | 7eae8d3d98ac2a458b1330deff3642aa6a3a0a3d /source | |
parent | ecd86c05879dc0802d7fb463d64b96559e43a4df (diff) | |
parent | 1c2a20c84d46d30bc429da87daf84d75162f9c9b (diff) |
Merge branch 'blender-v2.81-release'
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/render/render_shading.c | 14 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_pose.c | 8 |
2 files changed, 14 insertions, 8 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 9f13431f25a..7970d491877 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -103,15 +103,17 @@ static Object **object_array_for_shading(bContext *C, uint *r_objects_len) ScrArea *sa = CTX_wm_area(C); SpaceProperties *sbuts = NULL; View3D *v3d = NULL; - if (sa->spacetype == SPACE_PROPERTIES) { - sbuts = sa->spacedata.first; - } - else if (sa->spacetype == SPACE_VIEW3D) { - v3d = sa->spacedata.first; + if (sa != NULL) { + if (sa->spacetype == SPACE_PROPERTIES) { + sbuts = sa->spacedata.first; + } + else if (sa->spacetype == SPACE_VIEW3D) { + v3d = sa->spacedata.first; + } } Object **objects; - if (sbuts && sbuts->pinid && GS(sbuts->pinid->name) == ID_OB) { + if (sbuts != NULL && sbuts->pinid && GS(sbuts->pinid->name) == ID_OB) { objects = MEM_mallocN(sizeof(*objects), __func__); objects[0] = (Object *)sbuts->pinid; *r_objects_len = 1; diff --git a/source/blender/makesrna/intern/rna_pose.c b/source/blender/makesrna/intern/rna_pose.c index 0f8f8d39c41..8c4b7dd52d9 100644 --- a/source/blender/makesrna/intern/rna_pose.c +++ b/source/blender/makesrna/intern/rna_pose.c @@ -648,7 +648,7 @@ bool rna_PoseChannel_constraints_override_apply(Main *UNUSED(bmain), /* Remember that insertion operations are defined and stored in correct order, which means that * even if we insert several items in a row, we always insert first one, then second one, etc. - * So we should always find 'anchor' constraint in both _src *and* _dst> */ + * So we should always find 'anchor' constraint in both _src *and* _dst */ bConstraint *con_anchor = NULL; if (opop->subitem_local_name && opop->subitem_local_name[0]) { con_anchor = BLI_findstring( @@ -669,7 +669,11 @@ bool rna_PoseChannel_constraints_override_apply(Main *UNUSED(bmain), } con_src = con_src ? con_src->next : pchan_src->constraints.first; - BLI_assert(con_src != NULL); + if (con_src == NULL) { + printf("%s: Could not find constraint to insert, doing nothing...\n", __func__); + BLI_assert(0); + return false; + } bConstraint *con_dst = BKE_constraint_duplicate_ex(con_src, 0, true); |