Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2021-08-31 20:17:05 +0300
committerHans Goudey <h.goudey@me.com>2021-08-31 20:17:05 +0300
commit838b6ec48af6fb767089784193d8525c5f5faf13 (patch)
treee72d07866860033debe74ca9d6143ec947e4528e
parent60fba8202ce4081516f7224074887327f793bfed (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.
-rw-r--r--source/blender/blenloader/intern/versioning_300.c2
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) {