diff --git a/Applications/ProjectData.cpp b/Applications/ProjectData.cpp index 44d8f4d2385aa0fe6133d95c6791fe05314f4264..c5c5b46ce89e29e7ca141ebb68a415784abb5953 100644 --- a/Applications/ProjectData.cpp +++ b/Applications/ProjectData.cpp @@ -51,7 +51,12 @@ ProjectData::ProjectData(ConfigTree const& project_config, std::string const mesh_file = BaseLib::copyPathToFileName( project_config.get<std::string>("mesh"), path ); - _mesh_vec.push_back(FileIO::readMeshFromFile(mesh_file)); + + MeshLib::Mesh* const mesh = FileIO::readMeshFromFile(mesh_file); + if (!mesh) + ERR("Could not read mesh from \'%s\' file. No mesh added.", + mesh_file.c_str()); + _mesh_vec.push_back(mesh); // process variables parseProcessVariables(project_config.get_child("process_variables"));