summaryrefslogtreecommitdiffstats
path: root/libdimension/camera.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/camera.c')
-rw-r--r--libdimension/camera.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libdimension/camera.c b/libdimension/camera.c
index 935a129..5c8a2c6 100644
--- a/libdimension/camera.c
+++ b/libdimension/camera.c
@@ -33,7 +33,7 @@ dmnsn_new_camera(void)
dmnsn_camera *camera = dmnsn_malloc(sizeof(dmnsn_camera));
camera->free_fn = NULL;
camera->trans = dmnsn_identity_matrix();
- camera->refcount = 0;
+ camera->refcount = 1;
return camera;
}
@@ -41,7 +41,7 @@ dmnsn_new_camera(void)
void
dmnsn_delete_camera(dmnsn_camera *camera)
{
- if (camera && DMNSN_DECREF(camera)) {
+ if (DMNSN_DECREF(camera)) {
if (camera->free_fn) {
camera->free_fn(camera->ptr);
}