diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-04 02:03:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-04 02:03:15 +0400 |
commit | 8052bf0ec23e6e49300b461cad8bdbc2474852ab (patch) | |
tree | 573b51ff41a115936b8767699c2bdabbf173bc5c /source/blender/blenkernel/intern/movieclip.c | |
parent | 6e940a15cb265710310897f9885b92273878cd64 (diff) |
add missing NULL checks from BKE_constraint_get_typeinfo(), so constraints from the future dont crash.
also remove some redundant NULL checks.
Diffstat (limited to 'source/blender/blenkernel/intern/movieclip.c')
-rw-r--r-- | source/blender/blenkernel/intern/movieclip.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index e8550e12e4f..42dd289ee33 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -1439,21 +1439,19 @@ void BKE_movieclip_unlink(Main *bmain, MovieClip *clip) bConstraint *con; for (con = ob->constraints.first; con; con = con->next) { - bConstraintTypeInfo *cti = BKE_constraint_get_typeinfo(con); - - if (cti->type == CONSTRAINT_TYPE_FOLLOWTRACK) { + if (con->type == CONSTRAINT_TYPE_FOLLOWTRACK) { bFollowTrackConstraint *data = (bFollowTrackConstraint *) con->data; if (data->clip == clip) data->clip = NULL; } - else if (cti->type == CONSTRAINT_TYPE_CAMERASOLVER) { + else if (con->type == CONSTRAINT_TYPE_CAMERASOLVER) { bCameraSolverConstraint *data = (bCameraSolverConstraint *) con->data; if (data->clip == clip) data->clip = NULL; } - else if (cti->type == CONSTRAINT_TYPE_OBJECTSOLVER) { + else if (con->type == CONSTRAINT_TYPE_OBJECTSOLVER) { bObjectSolverConstraint *data = (bObjectSolverConstraint *) con->data; if (data->clip == clip) |