mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 18:31:59 -05:00
Fix #14032: NPE in window_tile_inspector_scrollpaint()
This commit is contained in:
parent
f75a48d8dc
commit
397512f4d3
1 changed files with 8 additions and 2 deletions
|
@ -2282,20 +2282,26 @@ static void window_tile_inspector_scrollpaint(rct_window* w, rct_drawpixelinfo*
|
|||
typeName = language_get_string(STR_RIDE_COMPONENT_TRACK_CAPITALISED);
|
||||
break;
|
||||
case TILE_ELEMENT_TYPE_SMALL_SCENERY:
|
||||
{
|
||||
const auto* entry = tileElement->AsSmallScenery()->GetEntry();
|
||||
snprintf(
|
||||
buffer, sizeof(buffer), "%s (%s)", language_get_string(STR_OBJECT_SELECTION_SMALL_SCENERY),
|
||||
language_get_string(get_small_scenery_entry(tileElement->AsSmallScenery()->GetEntryIndex())->name));
|
||||
entry != nullptr ? language_get_string(entry->name) : "");
|
||||
typeName = buffer;
|
||||
break;
|
||||
}
|
||||
case TILE_ELEMENT_TYPE_ENTRANCE:
|
||||
typeName = language_get_string(STR_RIDE_CONSTRUCTION_ENTRANCE);
|
||||
break;
|
||||
case TILE_ELEMENT_TYPE_WALL:
|
||||
{
|
||||
const auto* entry = tileElement->AsWall()->GetEntry();
|
||||
snprintf(
|
||||
buffer, sizeof(buffer), "%s (%s)", language_get_string(STR_TILE_INSPECTOR_WALL),
|
||||
language_get_string(tileElement->AsWall()->GetEntry()->name));
|
||||
entry != nullptr ? language_get_string(entry->name) : "");
|
||||
typeName = buffer;
|
||||
break;
|
||||
}
|
||||
case TILE_ELEMENT_TYPE_LARGE_SCENERY:
|
||||
typeName = language_get_string(STR_OBJECT_SELECTION_LARGE_SCENERY);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue