mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-02-23 13:31:31 -05:00
--Bug fixes
-Gracefully recover from reading a bad palette file.
This commit is contained in:
parent
31efd3e455
commit
4133db9f83
@ -57,6 +57,13 @@ public:
|
|||||||
palettes.first->second.reserve(buf.size() / 2048);//Roughly what it takes per palette.
|
palettes.first->second.reserve(buf.size() / 2048);//Roughly what it takes per palette.
|
||||||
ParsePalettes(rootNode, pfilename, palettes.first->second);
|
ParsePalettes(rootNode, pfilename, palettes.first->second);
|
||||||
xmlFreeDoc(doc);
|
xmlFreeDoc(doc);
|
||||||
|
|
||||||
|
if (palettes.first->second.empty())
|
||||||
|
{
|
||||||
|
added = false;//Reading failed, likely not a valid palette file.
|
||||||
|
s_Palettes.erase(filename);
|
||||||
|
AddToReport(string(loc) + " : Couldn't parse xml doc");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user