Skip to content

Commit e2d13a0

Browse files
committed
fixes #23
1 parent 927eeea commit e2d13a0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

common/objloader.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ bool loadOBJ(
6767
int matches = fscanf(file, "%d/%d/%d %d/%d/%d %d/%d/%d\n", &vertexIndex[0], &uvIndex[0], &normalIndex[0], &vertexIndex[1], &uvIndex[1], &normalIndex[1], &vertexIndex[2], &uvIndex[2], &normalIndex[2] );
6868
if (matches != 9){
6969
printf("File can't be read by our simple parser :-( Try exporting with other options\n");
70+
fclose(file);
7071
return false;
7172
}
7273
vertexIndices.push_back(vertexIndex[0]);
@@ -105,7 +106,7 @@ bool loadOBJ(
105106
out_normals .push_back(normal);
106107

107108
}
108-
109+
fclose(file);
109110
return true;
110111
}
111112

0 commit comments

Comments
 (0)