Fix crash in id remapping of Graph editor.
authorBastien Montagne <montagne29@wanadoo.fr>
Tue, 9 Aug 2016 18:00:53 +0000 (20:00 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Tue, 9 Aug 2016 18:00:53 +0000 (20:00 +0200)
dopsheet data pointer is not guaranteed to be set it seems...

source/blender/editors/space_graph/space_graph.c

index 2582ba4be8ddf1433359e39739f10b0e2c6b58ac..b35d1b2c777379febc245d489c00453a0f39a64c 100644 (file)
@@ -687,7 +687,7 @@ static void graph_id_remap(ScrArea *UNUSED(sa), SpaceLink *slink, ID *old_id, ID
                return;
        }
 
                return;
        }
 
-       if ((ID *)sgraph->ads->filter_grp == old_id) {
+       if (sgraph->ads && (ID *)sgraph->ads->filter_grp == old_id) {
                sgraph->ads->filter_grp = (Group *)new_id;
        }
 }
                sgraph->ads->filter_grp = (Group *)new_id;
        }
 }