summaryrefslogtreecommitdiff
path: root/libretro
diff options
context:
space:
mode:
authortwinaphex2017-01-24 02:19:17 +0100
committertwinaphex2017-01-24 02:19:17 +0100
commitf50d04d4598750e5d82426871f45b084eea01f16 (patch)
treea7b3ba2347747d637781e5b4126d4587c261911e /libretro
parent79faa3ca54b9950c0be9ef19ce3acfe4be3d4408 (diff)
downloadsnes9x2002-f50d04d4598750e5d82426871f45b084eea01f16.tar.gz
snes9x2002-f50d04d4598750e5d82426871f45b084eea01f16.tar.bz2
snes9x2002-f50d04d4598750e5d82426871f45b084eea01f16.zip
return false if game is NULL inside retro_load_game
Diffstat (limited to 'libretro')
-rw-r--r--libretro/libretro.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libretro/libretro.c b/libretro/libretro.c
index d1d14f8..e97bcdf 100644
--- a/libretro/libretro.c
+++ b/libretro/libretro.c
@@ -515,8 +515,11 @@ void retro_cheat_set(unsigned index, bool enable, const char* in_code)
bool retro_load_game(const struct retro_game_info *game)
{
bool8 loaded;
-
enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_RGB565;
+
+ if (!game)
+ return false;
+
if (!environ_cb(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt))
{
fprintf(stderr, "[libretro]: RGB565 is not supported.\n");