Fix: Incorrect versioning for float IDProperty UI data

The code put the value from the "min" property into the "max"
value. This would have crashed if min was null and max wasn't.
This commit is contained in:
Hans Goudey 2021-08-31 12:17:05 -05:00
parent 60fba8202c
commit 838b6ec48a
Notes: blender-bot 2023-02-14 10:32:59 +01:00
Referenced by issue #91118, "Cursor to Select" does not work properly when the mesh has armature modifier in edit mode
Referenced by issue #91092, Render crash
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ static void version_idproperty_move_data_float(IDPropertyUIDataFloat *ui_data,
}
IDProperty *max = IDP_GetPropertyFromGroup(prop_ui_data, "max");
if (max != NULL) {
ui_data->max = ui_data->soft_max = IDP_coerce_to_double_or_zero(min);
ui_data->max = ui_data->soft_max = IDP_coerce_to_double_or_zero(max);
}
IDProperty *soft_min = IDP_GetPropertyFromGroup(prop_ui_data, "soft_min");
if (soft_min != NULL) {