diff --git a/panda/src/express/crypto_utils.cxx b/panda/src/express/crypto_utils.cxx index 8da2d7b093..ce946fb890 100644 --- a/panda/src/express/crypto_utils.cxx +++ b/panda/src/express/crypto_utils.cxx @@ -20,8 +20,9 @@ #include "hashVal.h" - +#include "config_express.h" #include "crypto_utils.h" + #include #include #include @@ -85,8 +86,19 @@ md5_a_file(const Filename &name, HashVal &ret) { MD5 md5; string fs = name.to_os_specific(); - FileSource f(fs.c_str(), true, - new HashFilter(md5, new HexEncoder(new FileSink(os)))); + + try { + FileSource f(fs.c_str(), true, + new HashFilter(md5, new HexEncoder(new FileSink(os)))); + } catch (...) { + express_cat.warning() + << "Unable to read " << name << " to compute md5 hash.\n"; + ret.hv[0] = 0; + ret.hv[1] = 0; + ret.hv[2] = 0; + ret.hv[3] = 0; + return; + } istringstream is(os.str());