Fix #14067: Nullptr exception in vehicle measurement code

This commit is contained in:
Duncan authored and GitHub committed 2021-02-11 09:49:13 +01:00
1 parent fe8b8280e8
commit 14cca95fec
1 file changed
+3
+3
View File
@@ -1886,6 +1886,9 @@ void Vehicle::UpdateMeasurements()
continue;
rct_scenery_entry* scenery = tileElement->AsSmallScenery()->GetEntry();
if (scenery == nullptr)
continue;
if (scenery_small_entry_has_flag(scenery, SMALL_SCENERY_FLAG_FULL_TILE))
{
coverFound = true;