1
0
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:
Michael Steenbeek
2016-12-16 17:00:55 +01:00
committed by Ted John
parent 4669756d3e
commit 1018ec2b33

View File

@@ -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) {