From 98d797b67c07e85889768bf8ecde292e9e6f70e9 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 20 Sep 2017 20:24:54 +0200 Subject: Fix missing ID remapping in Action editor callback. Spotted by Joshua Leung (@aligorith), thanks! Should probably be backported to 2.79a should we do it. --- source/blender/editors/space_action/space_action.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_action') diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index 83655a2ba9e..5cde224b7dc 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -624,13 +624,17 @@ static void action_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, I { SpaceAction *sact = (SpaceAction *)slink; - if (!ELEM(GS(old_id->name), ID_GR)) { - return; + if ((ID *)sact->action == old_id) { + sact->action = (bAction *)new_id; } if ((ID *)sact->ads.filter_grp == old_id) { sact->ads.filter_grp = (Group *)new_id; } + if ((ID *)sact->ads.source == old_id) { + sact->ads.source = new_id; + } + } /* only called once, from space/spacetypes.c */ -- cgit v1.2.3