From 960783a21ac89edf1516276099cbb883cbc120c0 Mon Sep 17 00:00:00 2001 From: Pratik Borhade Date: Tue, 22 Mar 2022 12:03:53 +0100 Subject: 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. --- source/blender/editors/animation/anim_channels_edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index b97837a76b9..01903be9972 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -1147,7 +1147,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; -- cgit v1.2.3