Merged changes in the trunk up to revision 45431.
[blender.git] / source / blender / editors / interface / interface_templates.c
index fec1faa738a6f954fc73004e85136deade4f3510..3c0d44731c973b77ad581c6fdf8822e2bbced529 100644 (file)
@@ -2166,6 +2166,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
        else if (itemptr->type == &RNA_ShapeKey) {
                Object *ob = (Object *)activeptr->data;
                Key *key = (Key *)itemptr->id.data;
+               KeyBlock *kb = (KeyBlock *)itemptr->data;
 
                split = uiLayoutSplit(sub, 0.66f, 0);
 
@@ -2177,8 +2178,8 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
                else uiItemR(row, itemptr, "value", 0, "", ICON_NONE);
                uiItemR(row, itemptr, "mute", 0, "", 0);
 
-               if ( (key->flag & KEYBLOCK_MUTE) ||
-                    (ob->mode == OB_MODE_EDIT && !((ob->shapeflag & OB_SHAPE_EDIT_MODE) && ob->type == OB_MESH)) )
+               if ((kb->flag & KEYBLOCK_MUTE) ||
+                   (ob->mode == OB_MODE_EDIT && !((ob->shapeflag & OB_SHAPE_EDIT_MODE) && ob->type == OB_MESH)))
                {
                        uiLayoutSetActive(row, 0);
                }