Commit 89b90941 authored by Berk Geveci's avatar Berk Geveci
Browse files

BUG: Should check for null pointer before deleting

parent b672b37d
......@@ -47,7 +47,7 @@
#include <vtkstd/set>
#include <vtkstd/algorithm>
vtkCxxRevisionMacro(vtkKdTree, "1.6");
vtkCxxRevisionMacro(vtkKdTree, "1.7");
// Timing data ---------------------------------------------
......@@ -219,8 +219,11 @@ void vtkKdTree::DeleteCellLists()
//----------------------------------------------------------------------------
vtkKdTree::~vtkKdTree()
{
this->DataSets->Delete();
this->DataSets = NULL;
if (this->DataSets)
{
this->DataSets->Delete();
this->DataSets = NULL;
}
this->FreeSearchStructure();
......
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