summaryrefslogtreecommitdiffstats
path: root/libdimension/texture.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-10-19 00:49:24 +0000
committerTavian Barnes <tavianator@gmail.com>2009-10-19 00:49:24 +0000
commit8710689500d3d35d04aabd727f12698590a816cb (patch)
tree02d69e8d47c584faff6b7b2622adb69699886078 /libdimension/texture.c
parent19b06b1485a87a773d3f1ce897f6a00a22e6243d (diff)
downloaddimension-8710689500d3d35d04aabd727f12698590a816cb.tar.xz
Improve garbage handling of dmnsn_delete_object().
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);
+ }
}