Skip to content
Snippets Groups Projects
Commit a4232027 authored by kwolekr's avatar kwolekr
Browse files

Schematics: Error if unable to open file

parent 11372ac6
No related branches found
No related tags found
No related merge requests found
......@@ -207,6 +207,11 @@ bool Schematic::loadSchematicFromFile(const char *filename, INodeDefManager *nde
bool have_cignore = false;
std::ifstream is(filename, std::ios_base::binary);
if (!is.good()) {
errorstream << "loadSchematicFile: unable to open file '"
<< filename << "'" << std::endl;
return false;
}
u32 signature = readU32(is);
if (signature != MTSCHEM_FILE_SIGNATURE) {
......
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