Commit 2c019257 authored by Charles Law's avatar Charles Law
Browse files

fixed segfualt when array name was NULL.

parent ddef9c38
......@@ -735,8 +735,15 @@ void vtkFieldData::PrintSelf(ostream& os, vtkIndent indent)
os << indent << "Number Of Arrays: " << this->GetNumberOfArrays() << "\n";
for (int i=0; i<this->GetNumberOfArrays(); i++)
{
os << indent << "Array " << i << " name = "
<< this->GetArrayName(i) << "\n";
if (this->GetArrayName(i))
{
os << indent << "Array " << i << " name = "
<< this->GetArrayName(i) << "\n";
}
else
{
os << indent << "Array " << i << " name = NULL\n";
}
}
os << indent << "Number Of Components: " << this->GetNumberOfComponents()
<< "\n";
......
Supports Markdown
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