2 minor glitches
[blender-staging.git] / source / blender / blenkernel / intern / action.c
index 5b49d9a9841204a94cc16cf8e3a67b1a69829ed4..77f56058a4f89755310b9a2e55cb52784658f24a 100644 (file)
@@ -831,7 +831,10 @@ void pose_remove_group (Object *ob)
                
                /* now, remove it from the pose */
                BLI_freelinkN(&pose->agroups, grp);
-               pose->active_group= 0;
+               pose->active_group--;
+               if(pose->active_group < 0 || pose->agroups.first == NULL) {
+                       pose->active_group= 0;
+               }
        }
 }