Commit: bc44d31c6d62f3e1c5df83623144be671f45625d
Author: Kévin Dietrich
Date: Sat Jul 23 18:09:50 2016 +0200
Branches: alembic_basic_io
https://developer.blender.org/rBbc44d31c6d62f3e1c5df83623144be671f45625d
Fix crash accessing array out of bounds.
===================================================================
M source/blender/alembic/intern/abc_curves.cc
===================================================================
diff --git a/source/blender/alembic/intern/abc_curves.cc
b/source/blender/alembic/intern/abc_curves.cc
index 39d494b..4e1e4e7 100644
--- a/source/blender/alembic/intern/abc_curves.cc
+++ b/source/blender/alembic/intern/abc_curves.cc
@@ -299,6 +299,7 @@ void read_curve_sample(Curve *cu, const ICurvesSchema
&schema, const float time)
nu->pntsu -= overlap;
}
+ const bool do_weights = (weights != NULL) && (weights->size() >
1);
float weight = 1.0f;
const bool do_radius = (radiuses != NULL) && (radiuses->size()
> 1);
@@ -316,7 +317,7 @@ void read_curve_sample(Curve *cu, const ICurvesSchema
&schema, const float time)
radius = (*radiuses)[idx];
}
- if (weights) {
+ if (do_weights) {
weight = (*weights)[idx];
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs