From 30bd71d14025375148be92ebffe309418d28585f Mon Sep 17 00:00:00 2001 From: David Pinedo Date: Thu, 23 Apr 2015 08:16:57 -0600 Subject: Demos: print error message when texture files can't be opened --- demos/cube.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/demos/cube.c b/demos/cube.c index 1af9efd3..d072a3c6 100644 --- a/demos/cube.c +++ b/demos/cube.c @@ -841,8 +841,12 @@ static void demo_prepare_texture_image(struct demo *demo, int32_t tex_height; VkResult U_ASSERT_ONLY err; - err = loadTexture(filename, NULL, NULL, &tex_width, &tex_height); - assert(err); + if (!loadTexture(filename, NULL, NULL, &tex_width, &tex_height)) + { + printf("Failed to load textures\n"); + fflush(stdout); + exit(1); + } tex_obj->tex_width = tex_width; tex_obj->tex_height = tex_height; -- cgit v1.2.3