From 2e1b862ace47f72d9b00c2bfe1524f4db4b45c09 Mon Sep 17 00:00:00 2001 From: outfrost Date: Tue, 18 Feb 2020 16:14:29 +0000 Subject: [PATCH] Remove nonsense pointer comparison --- src/asset.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/asset.c b/src/asset.c index 6dc0bb3..fafe81c 100644 --- a/src/asset.c +++ b/src/asset.c @@ -53,12 +53,10 @@ const Asset3D* importAsset(const char* path) { } } - if (aiMesh->mTextureCoords != NULL) { - mesh.textureCoords = malloc(numVertices * sizeof(Vector3D)); - for (unsigned int texcIndex = 0; texcIndex < numVertices; ++texcIndex) { - mesh.textureCoords[texcIndex] = convertAiVector3D( - aiMesh->mTextureCoords[0][texcIndex]); - } + mesh.textureCoords = malloc(numVertices * sizeof(Vector3D)); + for (unsigned int texcIndex = 0; texcIndex < numVertices; ++texcIndex) { + mesh.textureCoords[texcIndex] = convertAiVector3D( + aiMesh->mTextureCoords[0][texcIndex]); } for (unsigned int faceIndex = 0; faceIndex < numFaces; ++faceIndex) { -- 2.44.0