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:
Diffstat (limited to 'source/blender/functions/intern/attributes_ref.cc')
-rw-r--r--source/blender/functions/intern/attributes_ref.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/functions/intern/attributes_ref.cc b/source/blender/functions/intern/attributes_ref.cc
index 4686e217911..8f7f41be079 100644
--- a/source/blender/functions/intern/attributes_ref.cc
+++ b/source/blender/functions/intern/attributes_ref.cc
@@ -27,6 +27,10 @@ AttributesInfoBuilder::~AttributesInfoBuilder()
bool AttributesInfoBuilder::add(StringRef name, const CPPType &type, const void *default_value)
{
+ if (name.size() == 0) {
+ std::cout << "Warning: Tried to add an attribute with empty name.\n";
+ return false;
+ }
if (names_.add_as(name)) {
types_.append(&type);