mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 03:32:46 +00:00
do not initialize cheat system if memory size is 0 to avoid potential NPE
This commit is contained in:
parent
9ab3b1715d
commit
adeff434fd
@ -693,6 +693,10 @@ int cheat_manager_initialize_memory(rarch_setting_t *setting, bool wraparound)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( meminfo.size == 0 )
|
||||
{
|
||||
return 0 ;
|
||||
}
|
||||
cheat_manager_state.actual_memory_size = (unsigned)meminfo.size;
|
||||
cheat_manager_state.curr_memory_buf = meminfo.data;
|
||||
cheat_manager_state.total_memory_size = (unsigned)meminfo.size;
|
||||
|
Loading…
x
Reference in New Issue
Block a user