Commit 79b3e209 authored by Cory Quammen's avatar Cory Quammen Committed by Code Review

Merge topic 'fix_poly_line_source' into master

43a9b051 Added checking for NULL pointer in a few locations
parents 0c29a735 43a9b051
......@@ -36,7 +36,10 @@ vtkPolyLineSource::vtkPolyLineSource()
//----------------------------------------------------------------------------
vtkPolyLineSource::~vtkPolyLineSource()
{
this->Points->Delete();
if (this->Points)
{
this->Points->Delete();
}
}
//----------------------------------------------------------------------------
......@@ -60,7 +63,12 @@ void vtkPolyLineSource::SetNumberOfPoints(vtkIdType numPoints)
//----------------------------------------------------------------------------
vtkIdType vtkPolyLineSource::GetNumberOfPoints()
{
return this->Points->GetNumberOfPoints();
if (this->Points)
{
return this->Points->GetNumberOfPoints();
}
return 0;
}
//----------------------------------------------------------------------------
......@@ -139,4 +147,5 @@ void vtkPolyLineSource::PrintSelf(ostream& os, vtkIndent indent)
this->Superclass::PrintSelf(os, indent);
os << indent << "Points: " << this->Points << "\n";
os << indent << "Closed: " << this->Closed << "\n";
}
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