diff options
author | Hans Goudey <h.goudey@me.com> | 2021-08-31 20:17:05 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-08-31 20:17:05 +0300 |
commit | 838b6ec48af6fb767089784193d8525c5f5faf13 (patch) | |
tree | e72d07866860033debe74ca9d6143ec947e4528e /source | |
parent | 60fba8202ce4081516f7224074887327f793bfed (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/versioning_300.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/versioning_300.c b/source/blender/blenloader/intern/versioning_300.c index 2049fb7b9b4..13577164f20 100644 --- a/source/blender/blenloader/intern/versioning_300.c +++ b/source/blender/blenloader/intern/versioning_300.c @@ -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) { |