diff options
| author | hristo <[email protected]> | 2021-01-03 23:43:09 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-01-03 22:43:09 +0100 |
| commit | 551597d5793532b19ed71808803a0d6a6e1178b0 (patch) | |
| tree | 8af539631f43360b2fa6ee13defbbdaf9bd09a95 /src/models.c | |
| parent | 4bce0f27e6265fdcdae7dbb01ca112527c6acd70 (diff) | |
| download | raylib-551597d5793532b19ed71808803a0d6a6e1178b0.tar.gz raylib-551597d5793532b19ed71808803a0d6a6e1178b0.zip | |
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.
Diffstat (limited to 'src/models.c')
| -rw-r--r-- | src/models.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/src/models.c b/src/models.c index b014352d..60e08171 100644 --- a/src/models.c +++ b/src/models.c @@ -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; |
