1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-02-18 02:34:57 +00:00

Fix possible crash on mod enum

This commit is contained in:
fgenesis 2017-02-05 21:24:43 +01:00
parent 9229bb2c0a
commit 0b7334c7b7

View file

@ -1812,8 +1812,11 @@ void DSQ::loadModsCallback(const std::string &filename, void *param)
XMLDocument d; XMLDocument d;
if(!Mod::loadModXML(&d, name)) if(!Mod::loadModXML(&d, name))
{ {
const char *err = d.GetErrorStr1();
if(!err)
err = "<unknown error>";
std::ostringstream os; std::ostringstream os;
os << "Failed to load mod xml: " << filename << " -- Error: " << d.GetErrorStr1(); os << "Failed to load mod xml: " << filename << " -- Error: " << err;
dsq->debugLog(os.str()); dsq->debugLog(os.str());
return; return;
} }