mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 02:30:35 +00:00
fix(Metal): Fix SIGFAULT if any attribute is 0
This commit is contained in:
parent
6b7572d166
commit
eadc3f4a91
@ -382,7 +382,7 @@
|
||||
{
|
||||
assert(filter >= TEXTURE_FILTER_LINEAR && filter <= TEXTURE_FILTER_MIPMAP_NEAREST);
|
||||
|
||||
if (!image.pixels && !image.width && !image.height)
|
||||
if (!image.pixels || !image.width || !image.height)
|
||||
{
|
||||
/* Create a dummy texture instead. */
|
||||
#define T0 0xff000000u
|
||||
@ -403,6 +403,7 @@
|
||||
image.pixels = (uint32_t *)checkerboard;
|
||||
image.width = 8;
|
||||
image.height = 8;
|
||||
filter = TEXTURE_FILTER_MIPMAP_NEAREST;
|
||||
}
|
||||
|
||||
BOOL mipmapped = filter == TEXTURE_FILTER_MIPMAP_LINEAR || filter == TEXTURE_FILTER_MIPMAP_NEAREST;
|
||||
|
Loading…
Reference in New Issue
Block a user