Skip to content
Snippets Groups Projects
Commit 37d058e5 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

STLReader: Close the file when an error occurs

Change-Id: I38a189e6af609836a846d892050440e69473a9b7
parent 00c09514
No related branches found
No related tags found
No related merge requests found
......@@ -347,6 +347,7 @@ int vtkSTLReader::ReadASCIISTL(FILE *fp, vtkPoints *newPts,
{
vtkErrorMacro ("STLReader error reading file: " << this->FileName
<< " Premature EOF while reading header.");
fclose(fp);
return 0;
}
......@@ -369,6 +370,7 @@ int vtkSTLReader::ReadASCIISTL(FILE *fp, vtkPoints *newPts,
{
vtkErrorMacro ("STLReader error reading file: " << this->FileName
<< " Premature EOF while reading header.");
fclose(fp);
return 0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment