Skip to content
Snippets Groups Projects
Commit 67432d8a authored by Karsten Rink's avatar Karsten Rink
Browse files

bringing check to start of method

parent f73c52a5
No related branches found
No related tags found
No related merge requests found
......@@ -43,15 +43,11 @@ VtuInterface::~VtuInterface()
MeshLib::Mesh* VtuInterface::readVTUFile(std::string const &file_name)
{
vtkSmartPointer<vtkXMLUnstructuredGridReader> reader =
vtkSmartPointer<vtkXMLUnstructuredGridReader>::New();
std::ifstream in( file_name.c_str() );
if (!in.is_open())
if (!BaseLib::IsFileExisting(file_name))
return nullptr;
else
in.close();
vtkSmartPointer<vtkXMLUnstructuredGridReader> reader =
vtkSmartPointer<vtkXMLUnstructuredGridReader>::New();
reader->SetFileName(file_name.c_str());
reader->Update();
......
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