[Bf-blender-cvs] [a52c51e3df5] soc-2021-curve-fillet: Fixed crash due to unexpected attribute

dilithjay noreply at git.blender.org
Tue Aug 10 19:10:48 CEST 2021


Commit: a52c51e3df50e197252f6987196d18631061368d
Author: dilithjay
Date:   Tue Aug 10 18:41:06 2021 +0530
Branches: soc-2021-curve-fillet
https://developer.blender.org/rBa52c51e3df50e197252f6987196d18631061368d

Fixed crash due to unexpected attribute

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

M	source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc

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

diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc
index f5c0ca87052..916f1837fb4 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_curve_fillet.cc
@@ -285,7 +285,7 @@ static FilletData calculate_fillet_data(const Spline &spline,
     if (mode_param.radius_mode == GEO_NODE_CURVE_FILLET_RADIUS_FLOAT) {
       radius = mode_param.radius.value();
     }
-    else if (mode_param.radius_mode == GEO_NODE_CURVE_FILLET_RADIUS_ATTRIBUTE) {
+    else if (mode_param.radius_mode == GEO_NODE_CURVE_FILLET_RADIUS_ATTRIBUTE && spline_index + i < mode_param.radii->size()) {
       radius = (*mode_param.radii)[spline_index + i];
     }



More information about the Bf-blender-cvs mailing list