Commit fb7a8ffd authored by Sebastien Jourdain's avatar Sebastien Jourdain Committed by Kitware Robot

Merge topic 'fix-vera-out-reader-memory-leak'

24e2bea2 fix(vtkVeraOutReader): Memory leak
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !4534
parents 5de51292 24e2bea2
......@@ -805,7 +805,7 @@ private:
vtkNew<vtkFloatArray> XCoordinates;
vtkNew<vtkFloatArray> YCoordinates;
vtkSmartPointer<vtkObject> Owner;
vtkObject* Owner;
vtkSmartPointer<vtkDataArray> ZCoordinates;
vtkSmartPointer<vtkDataArray> CoreMap;
......@@ -847,7 +847,7 @@ int vtkVeraOutReader::RequestInformation(
if (!this->Superclass::RequestInformation(reqInfo, inVector, outVector))
return 0;
if (!this->FileName)
if (!this->FileName || this->FileName[0] == '\0')
{
vtkErrorMacro("No filename specified");
return 0;
......@@ -885,6 +885,12 @@ int vtkVeraOutReader::RequestInformation(
int vtkVeraOutReader::RequestData(vtkInformation* vtkNotUsed(reqInfo),
vtkInformationVector** vtkNotUsed(inVector), vtkInformationVector* outVector)
{
if (!this->FileName || this->FileName[0] == '\0')
{
vtkErrorMacro("No filename specified");
return 0;
}
vtkDebugMacro(<< "In vtkVeraOutReader::RequestData" << endl);
vtkInformation* outInfo = outVector->GetInformationObject(0);
vtkRectilinearGrid* output =
......
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