mirror of
https://github.com/captain-amygdala/pistorm.git
synced 2026-01-13 15:18:06 +00:00
Do not free MAPTYPE_RAM_NOALLOC mapped data
This commit is contained in:
parent
eac4c78c3e
commit
19ef9bfe60
@ -306,7 +306,9 @@ void free_config_file(struct emulator_config *cfg) {
|
||||
|
||||
for (int i = 0; i < MAX_NUM_MAPPED_ITEMS; i++) {
|
||||
if (cfg->map_data[i]) {
|
||||
free(cfg->map_data[i]);
|
||||
if (cfg->map_type[i] != MAPTYPE_RAM_NOALLOC) {
|
||||
free(cfg->map_data[i]);
|
||||
}
|
||||
cfg->map_data[i] = NULL;
|
||||
}
|
||||
if (cfg->map_id[i]) {
|
||||
@ -314,6 +316,7 @@ void free_config_file(struct emulator_config *cfg) {
|
||||
cfg->map_id[i] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if (cfg->mouse_file) {
|
||||
free(cfg->mouse_file);
|
||||
cfg->mouse_file = NULL;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user