diff options
author | Tavian Barnes <tavianator@gmail.com> | 2011-06-12 02:37:51 -0600 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2011-06-13 00:16:06 -0600 |
commit | 7acd8ea6673b7a90ed4041408ccf1b024b8a007a (patch) | |
tree | d52199dd7c58e0217bfd1a74e7601d739ad333f5 /libdimension/light.c | |
parent | 066261810c2fca192677c5c1c01c91d6ecec65a0 (diff) | |
download | dimension-7acd8ea6673b7a90ed4041408ccf1b024b8a007a.tar.xz |
Vast libdimension API and internals improvements.
Couldn't really do these while I was trying to be POV-Ray compatible,
'cause they would've broken compatibility.
Diffstat (limited to 'libdimension/light.c')
-rw-r--r-- | libdimension/light.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libdimension/light.c b/libdimension/light.c index 1103727..2ff8820 100644 --- a/libdimension/light.c +++ b/libdimension/light.c @@ -36,7 +36,7 @@ dmnsn_new_light(void) light->shadow_fn = NULL; light->free_fn = NULL; light->ptr = NULL; - light->refcount = 0; + light->refcount = 1; return light; } @@ -44,7 +44,7 @@ dmnsn_new_light(void) void dmnsn_delete_light(dmnsn_light *light) { - if (light && DMNSN_DECREF(light)) { + if (DMNSN_DECREF(light)) { if (light->free_fn) { light->free_fn(light->ptr); } |