Add missing fclose

This commit is contained in:
Shauren
2018-04-07 22:20:30 +02:00
parent 2c64bb97e6
commit a71d4b70ff
2 changed files with 4 additions and 0 deletions

View File

@@ -355,7 +355,10 @@ namespace VMAP
char ident[8];
if (fread(ident, 1, 8, model_list) != 8 || memcmp(ident, VMAP::RAW_VMAP_MAGIC, 8) != 0)
{
fclose(model_list);
return;
}
FILE* model_list_copy = fopen((iDestDir + "/" + GAMEOBJECT_MODELS).c_str(), "wb");
if (!model_list_copy)

View File

@@ -58,6 +58,7 @@ void LoadGameObjectModelList(std::string const& dataPath)
|| memcmp(magic, VMAP::VMAP_MAGIC, 8) != 0)
{
TC_LOG_ERROR("misc", "File '%s' has wrong header, expected %s.", VMAP::GAMEOBJECT_MODELS, VMAP::VMAP_MAGIC);
fclose(model_list_file);
return;
}