Removed a repeating allocation of memory (#1507)

Resolves #1495
This line allocated some memory that was already allocated in the beginning of the function and was essentially creating a leak.
This commit is contained in:
hristo 2021-01-03 23:43:09 +02:00 committed by GitHub
parent 4bce0f27e6
commit 551597d579
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1486,7 +1486,6 @@ Mesh GenMeshPlane(float width, float length, int resX, int resZ)
mesh.vertices = (float *)RL_MALLOC(plane->ntriangles*3*3*sizeof(float));
mesh.texcoords = (float *)RL_MALLOC(plane->ntriangles*3*2*sizeof(float));
mesh.normals = (float *)RL_MALLOC(plane->ntriangles*3*3*sizeof(float));
mesh.vboId = (unsigned int *)RL_CALLOC(DEFAULT_MESH_VERTEX_BUFFERS, sizeof(unsigned int));
mesh.vertexCount = plane->ntriangles*3;
mesh.triangleCount = plane->ntriangles;