Correct error in recent button type check
[blender.git] / source / blender / editors / interface / interface_handlers.c
index 91b9ba03fa216c1cd42378886125f3a62f10dd78..32cd22b03682bb478a39ba5f160164561f8c801f 100644 (file)
@@ -1125,14 +1125,12 @@ static bool ui_multibut_states_tag(
 
 static void ui_multibut_states_create(uiBut *but_active, uiHandleButtonData *data)
 {
-       uiBut *but;
-
        BLI_assert(data->multi_data.init == BUTTON_MULTI_INIT_SETUP);
        BLI_assert(data->multi_data.has_mbuts);
 
        data->multi_data.bs_mbuts = UI_butstore_create(but_active->block);
 
-       for (but = but_active->block->buttons.first; but; but = but->next) {
+       for (uiBut *but = but_active->block->buttons.first; but; but = but->next) {
                if (but->flag & UI_BUT_DRAG_MULTI) {
                        ui_multibut_add(data, but);
                }
@@ -1142,7 +1140,7 @@ static void ui_multibut_states_create(uiBut *but_active, uiHandleButtonData *dat
         * note: if we mix buttons which are proportional and others which are not,
         * this may work a bit strangely */
        if ((but_active->rnaprop && (RNA_property_flag(but_active->rnaprop) & PROP_PROPORTIONAL)) ||
-           ELEM(but->unit_type, PROP_UNIT_LENGTH))
+           ELEM(but_active->unit_type, PROP_UNIT_LENGTH))
        {
                if (data->origvalue != 0.0) {
                        data->multi_data.is_proportional = true;