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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-02-28 20:45:01 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-02-28 20:45:01 +0400
commit6cb896ff0a7d24be3ff500585642ae5d61a5b788 (patch)
tree84b6b1d6f71eec23e9a986470e916f059c323ef4 /intern/cycles/render/attribute.cpp
parent4a903395194aef1cfe97e4d50d73320a72280cf3 (diff)
Cycles: fix msvc compile warning, patch by Jason Wilkins.
Diffstat (limited to 'intern/cycles/render/attribute.cpp')
-rw-r--r--intern/cycles/render/attribute.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/intern/cycles/render/attribute.cpp b/intern/cycles/render/attribute.cpp
index aa18ca7d7cb..9e90bf1b625 100644
--- a/intern/cycles/render/attribute.cpp
+++ b/intern/cycles/render/attribute.cpp
@@ -101,9 +101,9 @@ ustring Attribute::standard_name(Attribute::Standard std)
/* Attribute Set */
-AttributeSet::AttributeSet(Mesh *mesh_)
+AttributeSet::AttributeSet()
{
- mesh = mesh_;
+ mesh = NULL;
}
AttributeSet::~AttributeSet()
@@ -133,7 +133,8 @@ Attribute *AttributeSet::add(ustring name, TypeDesc type, Attribute::Element ele
else if(element == Attribute::CORNER)
attr->set(name, type, element);
- attr->reserve(mesh->verts.size(), mesh->triangles.size());
+ if(mesh)
+ attr->reserve(mesh->verts.size(), mesh->triangles.size());
return attr;
}