fix null dereference when there is no runahead save state list

This commit is contained in:
Brad Parker 2018-05-01 19:19:27 -04:00
parent 95278d39f7
commit 99e4271f29

View File

@ -361,7 +361,10 @@ static bool runahead_create(void)
static bool runahead_save_state(void)
{
bool okay = false;
retro_ctx_serialize_info_t *serialize_info =
retro_ctx_serialize_info_t *serialize_info;
if (!runahead_save_state_list)
return false;
serialize_info =
(retro_ctx_serialize_info_t*)runahead_save_state_list->data[0];
set_fast_savestate();
okay = core_serialize(serialize_info);