summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2024-05-10 22:11:09 +0000
committerrodri <rgl@antares-labs.eu>2024-05-10 22:11:09 +0000
commit0cd80fe628fc0d8a3672f1fd1d3cfa96c0b0ea2e (patch)
tree4a1e5714d78b5195c8e0acceef27f1052dadb551
parentc1a0f17d5272255456af4be4e0aa5a7e697fcf11 (diff)
downloadlibgraphics-0cd80fe628fc0d8a3672f1fd1d3cfa96c0b0ea2e.tar.gz
libgraphics-0cd80fe628fc0d8a3672f1fd1d3cfa96c0b0ea2e.tar.bz2
libgraphics-0cd80fe628fc0d8a3672f1fd1d3cfa96c0b0ea2e.zip
scene: free model materials during cleanup.
-rw-r--r--scene.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/scene.c b/scene.c
index a430183..23a546a 100644
--- a/scene.c
+++ b/scene.c
@@ -306,6 +306,8 @@ delmodel(Model *m)
freememimage(m->tex);
if(m->nor != nil)
freememimage(m->nor);
+ if(m->nmaterials > 0)
+ free(m->materials);
if(m->nprims > 0)
free(m->prims);
free(m);