mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix #4883: Check if the map element is null before checking rights
This commit is contained in:
committed by
Ted John
parent
4669756d3e
commit
1018ec2b33
@@ -416,7 +416,11 @@ void map_count_remaining_land_rights()
|
||||
for (int x = 0; x <= 255; x++) {
|
||||
for (int y = 0; y <= 255; y++) {
|
||||
rct_map_element *element = map_get_surface_element_at(x, y);
|
||||
|
||||
// Surface elements are sometimes hacked out to save some space for other map elements
|
||||
if (element == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
uint8 flags = element->properties.surface.ownership;
|
||||
|
||||
if ((flags & OWNERSHIP_AVAILABLE) && (flags & OWNERSHIP_OWNED) == 0) {
|
||||
|
||||
Reference in New Issue
Block a user