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-10-21 01:45:14 +0300
committerHans Goudey <h.goudey@me.com>2021-10-21 01:45:14 +0300
commit6b761c59d25855080de683d15837f31172745f43 (patch)
tree3a7189be788290f9a2104aaea4e02447d49c8125 /source/blender
parent3f8b45d8d1fff8a082e3d35221d39854484e8551 (diff)
Fix: Empty id attribute on curve control points
No virtual array should be returned instead of returning an empty span.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/geometry_component_curve.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/geometry_component_curve.cc b/source/blender/blenkernel/intern/geometry_component_curve.cc
index 2f2851b4fd4..f30ff2a70a7 100644
--- a/source/blender/blenkernel/intern/geometry_component_curve.cc
+++ b/source/blender/blenkernel/intern/geometry_component_curve.cc
@@ -1104,6 +1104,10 @@ template<typename T> class BuiltinPointAttributeProvider : public BuiltinAttribu
return {};
}
+ if (!this->exists(component)) {
+ return {};
+ }
+
Span<SplinePtr> splines = curve->splines();
if (splines.size() == 1) {
return std::make_unique<fn::GVArray_For_GSpan>(get_span_(*splines.first()));
@@ -1125,6 +1129,10 @@ template<typename T> class BuiltinPointAttributeProvider : public BuiltinAttribu
return {};
}
+ if (!this->exists(component)) {
+ return {};
+ }
+
MutableSpan<SplinePtr> splines = curve->splines();
if (splines.size() == 1) {
return std::make_unique<fn::GVMutableArray_For_GMutableSpan>(