mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-01 13:56:06 -04:00
--Bug fixes
-Gracefully recover from reading a bad palette file.
This commit is contained in:
@ -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
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user