Vulkan: Check for more cases in vulkan_load_texture().

*Sigh*
This commit is contained in:
Hans-Kristian Arntzen 2016-12-03 18:54:34 +01:00
parent 42886713be
commit eb7870db5a

View File

@ -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