summaryrefslogtreecommitdiffstats
path: root/libdimension/point_light.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/point_light.c')
-rw-r--r--libdimension/point_light.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdimension/point_light.c b/libdimension/point_light.c
index cc0e47a..1ca3c96 100644
--- a/libdimension/point_light.c
+++ b/libdimension/point_light.c
@@ -19,6 +19,7 @@
*************************************************************************/
#include "dimension.h"
+#include <errno.h>
/*
* Point light source
@@ -39,6 +40,7 @@ dmnsn_new_point_light(dmnsn_vector x0, dmnsn_color color)
dmnsn_color *ptr = malloc(sizeof(dmnsn_color));
if (!ptr) {
dmnsn_delete_light(light);
+ errno = ENOMEM;
return NULL;
}
*ptr = color;