Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2018-04-12 16:42:55 +0300
committerJoshua Leung <aligorith@gmail.com>2018-04-12 16:50:26 +0300
commita494df8e383d7dd0a4c5e192ed3e0be71984cb84 (patch)
tree51a18f8175516cb8b24f42b730c3086f6e1d8aca /source/blender/editors/space_graph/space_graph.c
parentd213474070965ec142b4bee8a2cc9cb18fc7dad8 (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_graph/space_graph.c')
-rw-r--r--source/blender/editors/space_graph/space_graph.c14
1 files changed, 8 insertions, 6 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;
+ }
}
}