summaryrefslogtreecommitdiffstats
path: root/libdimension/texture.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/texture.c')
-rw-r--r--libdimension/texture.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libdimension/texture.c b/libdimension/texture.c
index f232cbc..a5ebd90 100644
--- a/libdimension/texture.c
+++ b/libdimension/texture.c
@@ -54,5 +54,8 @@ dmnsn_new_texture()
void
dmnsn_delete_texture(dmnsn_texture *texture)
{
- free(texture);
+ if (texture) {
+ dmnsn_delete_pigment(texture->pigment);
+ free(texture);
+ }
}