Bug #1921 ยป 0061-Fix-access_area_refresh-crash-with-nullptr-tile.patch
| common/accessarea.c | ||
|---|---|---|
|
BV_CLR_ALL(aarea->tiledefs);
|
||
|
pf_map_tiles_iterate(pfm, ptile, TRUE) {
|
||
|
tiledef_iterate(td) {
|
||
|
if (tile_matches_tiledef(td, ptile)) {
|
||
|
BV_SET(aarea->tiledefs, tiledef_number(td));
|
||
|
}
|
||
|
} tiledef_iterate_end;
|
||
|
if (ptile != nullptr) {
|
||
|
tiledef_iterate(td) {
|
||
|
if (tile_matches_tiledef(td, ptile)) {
|
||
|
BV_SET(aarea->tiledefs, tiledef_number(td));
|
||
|
}
|
||
|
} tiledef_iterate_end;
|
||
|
}
|
||
|
} pf_map_tiles_iterate_end;
|
||
|
pf_map_destroy(pfm);
|
||