little fix for more error handling

This commit is contained in:
Anselme 2017-08-29 15:26:16 +02:00
parent 7666f39406
commit 73968ae317

View File

@ -399,6 +399,8 @@ Serializable* ObjectLoader::quickLoad(std::string filename, std::string type, bo
std::fstream file;
auto mode = binary ? std::ios_base::in | std::ios_base::binary : std::ios_base::in;
file.open(filename, mode);
if(!file.is_open())
return nullptr;
ObjectLoader loader;
loader.loadAscii(file);
file.close();