This commit is contained in:
twinaphex 2020-08-18 16:53:19 +02:00
parent 21855dfb85
commit 3a21a6e134

View File

@ -201,15 +201,13 @@ static void gfx_thumbnail_handle_upload(
fade_enabled = true; fade_enabled = true;
/* Check we have a valid image */ /* Check we have a valid image */
if (!img) if (!img || (img->width < 1) || (img->height < 1))
goto end;
if ((img->width < 1) || (img->height < 1))
goto end; goto end;
/* Upload texture to GPU */ /* Upload texture to GPU */
if (!video_driver_texture_load( if (!video_driver_texture_load(
img, TEXTURE_FILTER_MIPMAP_LINEAR, &thumbnail_tag->thumbnail->texture)) img, TEXTURE_FILTER_MIPMAP_LINEAR,
&thumbnail_tag->thumbnail->texture))
goto end; goto end;
/* Cache dimensions */ /* Cache dimensions */