summaryrefslogtreecommitdiffstats
path: root/libdimension/ambient.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/ambient.c')
-rw-r--r--libdimension/ambient.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libdimension/ambient.c b/libdimension/ambient.c
index 309a9db..66fabe0 100644
--- a/libdimension/ambient.c
+++ b/libdimension/ambient.c
@@ -19,8 +19,9 @@
*************************************************************************/
#include "dimension.h"
-#include <stdlib.h> /* For malloc */
+#include <errno.h>
#include <math.h>
+#include <stdlib.h> /* For malloc */
/*
* Ambient finish
@@ -44,6 +45,7 @@ dmnsn_new_ambient_finish(dmnsn_color ambient)
dmnsn_color *param = malloc(sizeof(dmnsn_color));
if (!param) {
dmnsn_delete_finish(finish);
+ errno = ENOMEM;
return NULL;
}