summaryrefslogtreecommitdiffstats
path: root/libdimension/light.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/light.c')
-rw-r--r--libdimension/light.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libdimension/light.c b/libdimension/light.c
index d561526..cc2c961 100644
--- a/libdimension/light.c
+++ b/libdimension/light.c
@@ -19,6 +19,7 @@
*************************************************************************/
#include "dimension.h"
+#include <errno.h>
#include <stdlib.h> /* For malloc */
/* Allocate a new dummy light */
@@ -30,6 +31,8 @@ dmnsn_new_light()
light->light_fn = NULL;
light->free_fn = NULL;
light->ptr = NULL;
+ } else {
+ errno = ENOMEM;
}
return light;
}