[Bf-blender-cvs] [838b6ec48af] master: Fix: Incorrect versioning for float IDProperty UI data

Hans Goudey noreply at git.blender.org
Tue Aug 31 19:17:14 CEST 2021


Commit: 838b6ec48af6fb767089784193d8525c5f5faf13
Author: Hans Goudey
Date:   Tue Aug 31 12:17:05 2021 -0500
Branches: master
https://developer.blender.org/rB838b6ec48af6fb767089784193d8525c5f5faf13

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.

===================================================================

M	source/blender/blenloader/intern/versioning_300.c

===================================================================

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) {



More information about the Bf-blender-cvs mailing list