From 47618781d8d7bd1a1c6481857fcf982dc393d781 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Fri, 30 Jul 2021 11:58:02 +0200 Subject: Fix T89805: NLA crash without active track Was reported for a file which does not have an active track set in AnimData even though it was in strip twek mode (but this was accessed in is_nlatrack_evaluatable()). Root cause for this is not totally clear, but I assume the situation is described as part T87681 (and is fixed in D11052). This patch here just prevents the crash for files that are already in the borked state. Reviewers: sybren Maniphest Tasks: T89805 Differential Revision: https://developer.blender.org/D12085 --- source/blender/blenkernel/intern/anim_sys.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 6f4af6f655d..0155fdeef63 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -2190,7 +2190,7 @@ static void animsys_create_action_track_strip(const AnimData *adt, static bool is_nlatrack_evaluatable(const AnimData *adt, const NlaTrack *nlt) { /* Skip disabled tracks unless it contains the tweaked strip. */ - const bool contains_tweak_strip = (adt->flag & ADT_NLA_EDIT_ON) && + const bool contains_tweak_strip = (adt->flag & ADT_NLA_EDIT_ON) && adt->act_track && (nlt->index == adt->act_track->index); if ((nlt->flag & NLATRACK_DISABLED) && !contains_tweak_strip) { return false; -- cgit v1.2.3