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:
parent
9229bb2c0a
commit
0b7334c7b7
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue