Commit 1c52abf9 authored by Brad King's avatar Brad King

BUG: Added IsSafeToWrite() check to beginning of Write() method. It makes...

BUG: Added IsSafeToWrite() check to beginning of Write() method.  It makes sure a filename and input have been set.
parent 232dbb2e
......@@ -30,7 +30,7 @@
#include "vtkXMLStructuredGridWriter.h"
#include "vtkXMLUnstructuredGridWriter.h"
vtkCxxRevisionMacro(vtkXMLDataSetWriter, "1.1");
vtkCxxRevisionMacro(vtkXMLDataSetWriter, "1.2");
vtkStandardNewMacro(vtkXMLDataSetWriter);
//----------------------------------------------------------------------------
......@@ -69,6 +69,12 @@ vtkDataSet* vtkXMLDataSetWriter::GetInput()
//----------------------------------------------------------------------------
int vtkXMLDataSetWriter::Write()
{
// Make sure there are enough settings to write (Input, FileName, etc).
if(!this->IsSafeToWrite())
{
return 0;
}
vtkDataSet* input = this->GetInput();
vtkXMLWriter* writer = 0;
......
......@@ -30,7 +30,7 @@
#include "vtkXMLPStructuredGridWriter.h"
#include "vtkXMLPUnstructuredGridWriter.h"
vtkCxxRevisionMacro(vtkXMLPDataSetWriter, "1.1");
vtkCxxRevisionMacro(vtkXMLPDataSetWriter, "1.2");
vtkStandardNewMacro(vtkXMLPDataSetWriter);
//----------------------------------------------------------------------------
......@@ -69,6 +69,12 @@ vtkDataSet* vtkXMLPDataSetWriter::GetInput()
//----------------------------------------------------------------------------
int vtkXMLPDataSetWriter::Write()
{
// Make sure there are enough settings to write (Input, FileName, etc).
if(!this->IsSafeToWrite())
{
return 0;
}
vtkDataSet* input = this->GetInput();
vtkXMLPDataWriter* writer = 0;
......
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