1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 23:34:37 +01:00

Propagate error upward with LOCATION_NULL

This commit is contained in:
Tulio Leao
2019-11-21 08:00:06 -03:00
parent f94970b059
commit a9c2e1229a

View File

@@ -1379,6 +1379,7 @@ static void sub_6E1F34(
auto mapCoords = screen_get_map_xy_quadrant_with_z({ x, y }, z, &cl);
if (!mapCoords)
*grid_x = LOCATION_NULL;
return;
*grid_x = mapCoords->x;
*grid_y = mapCoords->y;
@@ -1561,6 +1562,7 @@ static void sub_6E1F34(
int16_t z = gSceneryCtrlPressZ;
auto mapCoords = screen_get_map_xy_side_with_z({ x, y }, z, &cl);
if (!mapCoords)
*grid_x = LOCATION_NULL;
return;
*grid_x = mapCoords->x;
*grid_y = mapCoords->y;