summaryrefslogtreecommitdiffstats
path: root/libdimension/phong.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension/phong.c')
-rw-r--r--libdimension/phong.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdimension/phong.c b/libdimension/phong.c
index 2bad239..8188488 100644
--- a/libdimension/phong.c
+++ b/libdimension/phong.c
@@ -19,6 +19,7 @@
*************************************************************************/
#include "dimension.h"
+#include <errno.h>
#include <stdlib.h> /* For malloc */
#include <math.h>
@@ -58,6 +59,7 @@ dmnsn_new_phong_finish(double specular, double exp)
double *params = malloc(2*sizeof(double));
if (!params) {
dmnsn_delete_finish(finish);
+ errno = ENOMEM;
return NULL;
}