diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-10-12 18:27:27 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-10-12 18:27:27 +0300 |
commit | 6f0b082378133afd944cc6af2e992c5f9fb12cd3 (patch) | |
tree | 5134f1442eda6c3b1f7f2c4e5b558571aacafa47 /source/blender | |
parent | 058a69974abd602a788ebd972edca171ee8e100b (diff) |
Animation: fix assertion failure on unsetting active keyframe
Avoid NULL pointer dereference when checking keyframe selection state in
`BLI_assert()` call.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/fcurve.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index d57ef45107c..2f8a8fcffdc 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -840,7 +840,7 @@ bool BKE_fcurve_calc_range( void BKE_fcurve_active_keyframe_set(FCurve *fcu, const BezTriple *active_bezt) { /* The active keyframe should always be selected. */ - BLI_assert(active_bezt->f2 & SELECT); + BLI_assert(active_bezt == NULL || (active_bezt->f2 & SELECT)); fcu->active_keyframe_index = (active_bezt == NULL) ? FCURVE_ACTIVE_KEYFRAME_NONE : active_bezt - fcu->bezt; } |