diff options
author | Pratik Borhade <PratikPB2123> | 2022-03-22 14:03:53 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2022-03-24 12:48:11 +0300 |
commit | 69cea4fce15fa4542b62a21d26987e14bd733744 (patch) | |
tree | 0a7e13cfd05e9486383fe0557bf5dbaebf10b4ef /source/blender/editors | |
parent | 3dc36b32a1e34fac8c1f266284ae0c44366c3a98 (diff) |
Fix T96624: NLA crash when reordering tracks if no object is selected.
Caused by rBc0bd240ad0a1.
To avoid crash, make boolean value false if active object data is NULL.
Should be backported to 2.93 LTS and 3.1 corrective releases.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/animation/anim_channels_edit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index e1d0ed833bf..1b27b27593d 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -1160,7 +1160,7 @@ static void rearrange_nla_channels(bAnimContext *ac, AnimData *adt, eRearrangeAn { AnimChanRearrangeFp rearrange_func; ListBase anim_data_visible = {NULL, NULL}; - const bool is_liboverride = ID_IS_OVERRIDE_LIBRARY(ac->obact); + const bool is_liboverride = (ac->obact != NULL) ? ID_IS_OVERRIDE_LIBRARY(ac->obact) : false; /* hack: invert mode so that functions will work in right order */ mode *= -1; |