1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-01 11:15:13 +01:00

Add error logging to get_first_element_at

This commit is contained in:
Duncan Frost
2015-01-29 17:45:08 +00:00
parent 9a976b4d40
commit fddcfc69e0

View File

@@ -88,6 +88,11 @@ void map_element_iterator_restart_for_tile(map_element_iterator *it)
rct_map_element *map_get_first_element_at(int x, int y)
{
if (x < 0 || y < 0)
{
log_error("Trying to access element outside of range");
return NULL;
}
return TILE_MAP_ELEMENT_POINTER(x + y * 256);
}