Merged changes in the trunk up to revision 36408.
[blender.git] / source / blender / editors / animation / anim_channels_edit.c
index adb011e92be7c14891b41c3d00603613466f22cf..7a8f81294491c07ae50c3b0d05679ca1ec7f3342 100644 (file)
@@ -169,9 +169,9 @@ void ANIM_set_active_channel (bAnimContext *ac, void *data, short datatype, int
                        case ANIMTYPE_DSLAT:
                        {
                                /* need to verify that this data is valid for now */
-                               // XXX: ale may be null!
-                               if (ale->adt)
+                               if (ale && ale->adt) {
                                        ale->adt->flag |= ADT_UI_ACTIVE;
+                               }
                        }
                                break;
                }
@@ -1003,7 +1003,7 @@ static void rearrange_action_channels (bAnimContext *ac, bAction *act, short mod
                
                for (agrp= act->groups.first; agrp; agrp= agrp->next) {
                        /* only consider F-Curves if they're visible (group expanded) */
-                       if (EXPANDED_AGRP(agrp)) {
+                       if (EXPANDED_AGRP(ac, agrp)) {
                                rearrange_animchannel_islands(&agrp->channels, rearrange_func, mode, ANIMTYPE_FCURVE);
                        }
                }