summaryrefslogtreecommitdiffstats
path: root/libdimension/camera.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/camera.c')
-rw-r--r--libdimension/camera.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libdimension/camera.c b/libdimension/camera.c
index 6a0ee80..eeb399c 100644
--- a/libdimension/camera.c
+++ b/libdimension/camera.c
@@ -19,6 +19,7 @@
*************************************************************************/
#include "dimension.h"
+#include <errno.h>
#include <stdlib.h> /* For malloc */
/* Allocate a new dummy camera */
@@ -28,6 +29,8 @@ dmnsn_new_camera()
dmnsn_camera *camera = malloc(sizeof(dmnsn_camera));
if (camera) {
camera->free_fn = NULL;
+ } else {
+ errno = ENOMEM;
}
return camera;
}