From 558dfd64f2c3d0b60c07451894c41cbfb2f032bd Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 17 May 2016 16:34:23 +0200 Subject: [PATCH] Exit video_texture_image_load_internal if we build without HAVE_RJPEG/HAVE_RPNG depending on content type --- gfx/video_texture_image.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/gfx/video_texture_image.c b/gfx/video_texture_image.c index 5d14a219e8..945e739df4 100644 --- a/gfx/video_texture_image.c +++ b/gfx/video_texture_image.c @@ -159,7 +159,27 @@ static bool video_texture_image_load_internal( { int ret; bool success = false; - void *img = image_transfer_new(type); + void *img = NULL; + + switch (type) + { + case IMAGE_TYPE_JPEG: +#ifdef HAVE_RJPEG + break; +#else + return false; +#endif + case IMAGE_TYPE_PNG: +#ifdef HAVE_RPNG + break; +#else + return false; +#endif + default: + break; + } + + img = image_transfer_new(type); if (!img) goto end;