Library: Fixed resource leak
This commit is contained in:
parent
569a29bc4a
commit
e0244d343d
|
@ -64,10 +64,9 @@ bool Library::load(const char exename[], const char path[])
|
||||||
}
|
}
|
||||||
|
|
||||||
tinyxml2::XMLDocument doc;
|
tinyxml2::XMLDocument doc;
|
||||||
if (doc.LoadFile(fp) != tinyxml2::XML_NO_ERROR)
|
const tinyxml2::XMLError error = doc.LoadFile(fp);
|
||||||
return false;
|
fclose(fp);
|
||||||
|
return (error != tinyxml2::XML_NO_ERROR) && load(doc);
|
||||||
return load(doc);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Library::load(const tinyxml2::XMLDocument &doc)
|
bool Library::load(const tinyxml2::XMLDocument &doc)
|
||||||
|
|
Loading…
Reference in New Issue