Commit c816cb55 authored by Burlen Loring's avatar Burlen Loring

fix data requirements array iterator with empty mesh

don't report that the mesh does not exist when the mesh is
there but has no arrays. it is valid to have only geometry
parent c0c2ece8
......@@ -250,13 +250,19 @@ MeshRequirementsIterator DataRequirements::GetMeshRequirementsIterator() const
ArrayRequirementsIterator DataRequirements::GetArrayRequirementsIterator(
const std::string &meshName) const
{
MeshArrayMapType::const_iterator it = this->MeshArrayMap.find(meshName);
if (it != this->MeshArrayMap.end())
if (this->MeshNames.find(meshName) == this->MeshNames.end())
{
SENSEI_ERROR("No mesh named \"" << meshName << "\"")
}
else
{
ArrayRequirementsIterator ait(it->second);
return ait;
MeshArrayMapType::const_iterator it = this->MeshArrayMap.find(meshName);
if (it != this->MeshArrayMap.end())
{
ArrayRequirementsIterator ait(it->second);
return ait;
}
}
SENSEI_ERROR("No mesh named \"" << meshName << "\"")
return ArrayRequirementsIterator();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment