aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Pinedo <david@lunarg.com>2015-04-23 08:16:57 -0600
committerCourtney Goeltzenleuchter <courtney@LunarG.com>2015-04-27 15:31:22 -0600
commit30bd71d14025375148be92ebffe309418d28585f (patch)
treed1f8c2becff220ca505a5eda8d01681851eaa5f1
parent8d26c060333f74b458c9f063f13c0c86c6e6fe94 (diff)
downloadusermoji-30bd71d14025375148be92ebffe309418d28585f.tar.xz
Demos: print error message when texture files can't be opened
-rw-r--r--demos/cube.c8
1 files 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;