[Bf-blender-cvs] [fc719e98aa4] virtual-array-attributes: check for empty attribute name

Jacques Lucke noreply at git.blender.org
Sat Apr 17 14:25:50 CEST 2021


Commit: fc719e98aa4ea84b6fd16af09afacd6788608320
Author: Jacques Lucke
Date:   Fri Apr 16 15:42:03 2021 +0200
Branches: virtual-array-attributes
https://developer.blender.org/rBfc719e98aa4ea84b6fd16af09afacd6788608320

check for empty attribute name

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

M	source/blender/blenkernel/intern/attribute_access.cc

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

diff --git a/source/blender/blenkernel/intern/attribute_access.cc b/source/blender/blenkernel/intern/attribute_access.cc
index 4c0c325b8c4..3170ad12c93 100644
--- a/source/blender/blenkernel/intern/attribute_access.cc
+++ b/source/blender/blenkernel/intern/attribute_access.cc
@@ -866,6 +866,11 @@ static blender::bke::OutputAttribute create_output_attribute(
   using namespace blender;
   using namespace blender::fn;
   using namespace blender::bke;
+
+  if (attribute_name.is_empty()) {
+    return {};
+  }
+
   const CPPType *cpp_type = custom_data_type_to_cpp_type(data_type);
   BLI_assert(cpp_type != nullptr);
   const nodes::DataTypeConversions &conversions = nodes::get_implicit_type_conversions();



More information about the Bf-blender-cvs mailing list