Commit 75932e92 authored by Brad King's avatar Brad King 💬
Browse files

BUG: Fixed crash in progress support when input file doesn't exist.

parent 4db8d6a8
......@@ -21,7 +21,7 @@
#include "vtkPointSet.h"
#include "vtkCellArray.h"
vtkCxxRevisionMacro(vtkXMLPUnstructuredDataReader, "1.10");
vtkCxxRevisionMacro(vtkXMLPUnstructuredDataReader, "1.11");
//----------------------------------------------------------------------------
vtkXMLPUnstructuredDataReader::vtkXMLPUnstructuredDataReader()
......@@ -99,13 +99,27 @@ vtkIdType vtkXMLPUnstructuredDataReader::GetNumberOfCells()
//----------------------------------------------------------------------------
vtkIdType vtkXMLPUnstructuredDataReader::GetNumberOfPointsInPiece(int piece)
{
return this->PieceReaders[piece]->GetNumberOfPoints();
if(this->PieceReaders[piece])
{
return this->PieceReaders[piece]->GetNumberOfPoints();
}
else
{
return 0;
}
}
//----------------------------------------------------------------------------
vtkIdType vtkXMLPUnstructuredDataReader::GetNumberOfCellsInPiece(int piece)
{
return this->PieceReaders[piece]->GetNumberOfCells();
if(this->PieceReaders[piece])
{
return this->PieceReaders[piece]->GetNumberOfCells();
}
else
{
return 0;
}
}
//----------------------------------------------------------------------------
......
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