diff options
author | Joshua Leung <aligorith@gmail.com> | 2018-04-12 16:42:55 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2018-04-12 16:50:26 +0300 |
commit | a494df8e383d7dd0a4c5e192ed3e0be71984cb84 (patch) | |
tree | 51a18f8175516cb8b24f42b730c3086f6e1d8aca /source/blender/editors/space_nla/space_nla.c | |
parent | d213474070965ec142b4bee8a2cc9cb18fc7dad8 (diff) |
Fix: Follow up to 16b795cb95c
It's not just the Graph Editor that needed this - the NLA also uses similar code
and thus suffers from a similar problem.
(My first commit from the Blender Institute v2.0 - Just testing that everything works)
Diffstat (limited to 'source/blender/editors/space_nla/space_nla.c')
-rw-r--r-- | source/blender/editors/space_nla/space_nla.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c index 020b3a41f4d..f1e8b655673 100644 --- a/source/blender/editors/space_nla/space_nla.c +++ b/source/blender/editors/space_nla/space_nla.c @@ -505,12 +505,14 @@ static void nla_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn) static void nla_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, ID *new_id) { SpaceNla *snla = (SpaceNla *)slink; - - if ((ID *)snla->ads->filter_grp == old_id) { - snla->ads->filter_grp = (Group *)new_id; - } - if ((ID *)snla->ads->source == old_id) { - snla->ads->source = new_id; + + if (snla->ads) { + if ((ID *)snla->ads->filter_grp == old_id) { + snla->ads->filter_grp = (Group *)new_id; + } + if ((ID *)snla->ads->source == old_id) { + snla->ads->source = new_id; + } } } |