mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
Vulkan: Check for more cases in vulkan_load_texture().
*Sigh*
This commit is contained in:
parent
42886713be
commit
eb7870db5a
@ -2155,10 +2155,10 @@ static uintptr_t vulkan_load_texture(void *video_data, void *data,
|
|||||||
vk_t *vk = (vk_t*)video_data;
|
vk_t *vk = (vk_t*)video_data;
|
||||||
struct texture_image *image = (struct texture_image*)data;
|
struct texture_image *image = (struct texture_image*)data;
|
||||||
struct vk_texture *texture = (struct vk_texture*)calloc(1, sizeof(*texture));
|
struct vk_texture *texture = (struct vk_texture*)calloc(1, sizeof(*texture));
|
||||||
if (!texture)
|
if (!image || !texture)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (!image->pixels)
|
if (!image->pixels || !image->width || !image->height)
|
||||||
{
|
{
|
||||||
/* Create a dummy texture instead. */
|
/* Create a dummy texture instead. */
|
||||||
#define T0 0xff000000u
|
#define T0 0xff000000u
|
||||||
|
Loading…
x
Reference in New Issue
Block a user