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 | |
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')
-rw-r--r-- | source/blender/editors/space_graph/space_graph.c | 14 | ||||
-rw-r--r-- | source/blender/editors/space_nla/space_nla.c | 14 |
2 files changed, 16 insertions, 12 deletions
diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 530506e7c1d..362bd284105 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -682,12 +682,14 @@ static void graph_refresh(const bContext *C, ScrArea *sa) static void graph_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, ID *new_id) { SpaceIpo *sgraph = (SpaceIpo *)slink; - - if (sgraph->ads && (ID *)sgraph->ads->filter_grp == old_id) { - sgraph->ads->filter_grp = (Group *)new_id; - } - if (sgraph->ads && (ID *)sgraph->ads->source == old_id) { - sgraph->ads->source = new_id; + + if (sgraph->ads) { + if ((ID *)sgraph->ads->filter_grp == old_id) { + sgraph->ads->filter_grp = (Group *)new_id; + } + if ((ID *)sgraph->ads->source == old_id) { + sgraph->ads->source = new_id; + } } } 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; + } } } |