summaryrefslogtreecommitdiffstats
path: root/libdimension/texture.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2010-11-08 01:08:51 -0500
committerTavian Barnes <tavianator@gmail.com>2010-11-08 01:08:51 -0500
commit809c882062182afef2f68c4440194111ec4142ab (patch)
tree2de396a9ba8b26c22919855e69c69a5075a54a61 /libdimension/texture.c
parenta9b0cc704a937015abba6094cdd14b1f2ecbb5e3 (diff)
downloaddimension-809c882062182afef2f68c4440194111ec4142ab.tar.xz
Fix double-init bug for inherited textures.
Diffstat (limited to 'libdimension/texture.c')
-rw-r--r--libdimension/texture.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/libdimension/texture.c b/libdimension/texture.c
index 7a012b5..9305f46 100644
--- a/libdimension/texture.c
+++ b/libdimension/texture.c
@@ -85,11 +85,12 @@ dmnsn_texture *
dmnsn_new_texture()
{
dmnsn_texture *texture = dmnsn_malloc(sizeof(dmnsn_texture));
- texture->pigment = NULL;
- texture->finish = NULL;
- texture->trans = dmnsn_identity_matrix();
- texture->refcount = dmnsn_malloc(sizeof(unsigned int));
- *texture->refcount = 1;
+ texture->pigment = NULL;
+ texture->finish = NULL;
+ texture->trans = dmnsn_identity_matrix();
+ texture->refcount = dmnsn_malloc(sizeof(unsigned int));
+ *texture->refcount = 1;
+ texture->should_init = true;
return texture;
}