From 324de43f622ace14a51384cdf8bb7bb190b58699 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 17 Nov 2009 19:08:00 -0500 Subject: Implement phong shading. --- libdimension/scene.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libdimension/scene.c') diff --git a/libdimension/scene.c b/libdimension/scene.c index 38b1d19..7a39679 100644 --- a/libdimension/scene.c +++ b/libdimension/scene.c @@ -28,6 +28,10 @@ dmnsn_new_scene() dmnsn_scene *scene = malloc(sizeof(dmnsn_scene)); if (scene) { scene->default_texture = dmnsn_new_texture(); + if (!scene->default_texture) { + dmnsn_delete_scene(scene); + return NULL; + } scene->camera = NULL; scene->canvas = NULL; -- cgit v1.2.3