From c1967d0fb6dd4f3fa99ed18dceb1f476e109359d Mon Sep 17 00:00:00 2001 From: Nathan Vegdahl Date: Mon, 27 Jan 2025 09:52:32 +0100 Subject: [PATCH] Fix #133362: crash when autokeying object with motion path but no action When moving an object with a motion path and animdata but no assigned action, and with certain auto-key settings enabled, Blender would crash. The cause was code that tried to access an action's fcurves without proper guarding: the guard checked whether an object had animdata, but not whether it had an action assigned or not, and would happily try to access that non-existent action's fcurves. This fixes the crash by also checking if an action is assigned. Pull Request: https://projects.blender.org/blender/blender/pulls/133552 --- source/blender/editors/animation/anim_motion_paths.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/animation/anim_motion_paths.cc b/source/blender/editors/animation/anim_motion_paths.cc index a6659b68e89..26248635195 100644 --- a/source/blender/editors/animation/anim_motion_paths.cc +++ b/source/blender/editors/animation/anim_motion_paths.cc @@ -459,8 +459,8 @@ void animviz_calc_motionpaths(Depsgraph *depsgraph, mpt->keylist = ED_keylist_create(); ListBase *fcurve_list = nullptr; - if (adt) { - /* get pointer to animviz settings for each target */ + if (adt && adt->action) { + /* Get pointer to animviz settings for each target. */ bAnimVizSettings *avs = animviz_target_settings_get(mpt); /* it is assumed that keyframes for bones are all grouped in a single group