mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
Merge pull request #7331 from RetroSven/master
do not initialize cheat system if memory size is 0 to avoid potential NPE
This commit is contained in:
commit
cb21aa91cc
@ -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