From eb7870db5a52eb2e22c984fe7d29d97244728337 Mon Sep 17 00:00:00 2001 From: Hans-Kristian Arntzen Date: Sat, 3 Dec 2016 18:54:34 +0100 Subject: [PATCH] Vulkan: Check for more cases in vulkan_load_texture(). *Sigh* --- gfx/drivers/vulkan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 38abdb03c8..2397aeed84 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -2155,10 +2155,10 @@ static uintptr_t vulkan_load_texture(void *video_data, void *data, vk_t *vk = (vk_t*)video_data; struct texture_image *image = (struct texture_image*)data; struct vk_texture *texture = (struct vk_texture*)calloc(1, sizeof(*texture)); - if (!texture) + if (!image || !texture) return 0; - if (!image->pixels) + if (!image->pixels || !image->width || !image->height) { /* Create a dummy texture instead. */ #define T0 0xff000000u