Tools/mmaps_generator: Only initialize memory for inds mesh when it will be read (#29795)

* this change does NOT require re-generating mmaps
This commit is contained in:
thesillyone
2024-03-25 23:35:40 +01:00
committed by GitHub
parent 48558c1631
commit a59f7351dd

View File

@@ -397,16 +397,15 @@ namespace MMAP
}
float* verts = new float[verticesCount];
int* inds = new int[indicesCount];
if (fread(verts, sizeof(float), verticesCount, file) != verticesCount)
{
fclose(file);
delete[] verts;
delete[] inds;
return;
}
int* inds = new int[indicesCount];
if (fread(inds, sizeof(int), indicesCount, file) != indicesCount)
{
fclose(file);