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.
This commit is contained in:
Pratik Borhade 2022-03-22 12:03:53 +01:00 committed by Bastien Montagne
parent 3b745f3455
commit 913b6b9ec1
Notes: blender-bot 2023-04-19 22:54:54 +02:00
Referenced by issue #88449: Blender LTS: Maintenance Task 2.93
Referenced by issue #88449, Blender LTS: Maintenance Task 2.93
Referenced by issue #96624, Regression: NLA crash when reordering tracks if no object is selected
Referenced by issue #96241, 3.1: Potential candidates for corrective releases
1 changed files with 1 additions and 1 deletions

View File

@ -1131,7 +1131,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;