(sdl_dingux) Put conditional around access of 'frame' pointer

This commit is contained in:
libretroadmin 2022-12-04 15:07:16 +01:00
parent 513370f715
commit fbfbb81133

View File

@ -1121,6 +1121,8 @@ static bool sdl_rs90_gfx_frame(void *data, const void *frame,
SDL_LockSurface(vid->screen);
if (likely(vid->mode_valid))
{
if (likely(frame))
{
/* Blit frame to SDL surface */
if (vid->rgb32)
@ -1130,6 +1132,7 @@ static bool sdl_rs90_gfx_frame(void *data, const void *frame,
sdl_rs90_blit_frame16(vid, (uint16_t*)frame,
width, height, pitch);
}
}
/* If current display mode is invalid,
* just display an error message */
else