1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 23:04:36 +01:00

Merge pull request #15552 from CookiePLMonster/fix-15227

Fix Object Selection not tearing down objects properly
This commit is contained in:
Michael Steenbeek
2021-10-11 09:30:33 +02:00
committed by GitHub
4 changed files with 6 additions and 1 deletions

View File

@@ -26,6 +26,7 @@
- Fix: [#15197] Cannot place flat ride after removing it in construction window.
- Fix: [#15199] Construction window is not closed when a ride gets demolished.
- Fix: [#15213] Freeze when hovering over Reverse Freefall Coaster in Russian.
- Fix: [#15227] Crash on exit after hovering over water types in the Object Selection window.
- Fix: [#15255] Tile Inspector shows banner information on walls that do not contain one.
- Fix: [#15257] Chat icon shows in scenario/track editor. Other icons don't disable when deactivated in options menu.
- Fix: [#15289] Unexpected behavior with duplicated banners which also caused desyncs in multiplayer.

View File

@@ -757,7 +757,10 @@ static void window_editor_object_selection_scroll_mouseover(
w->selected_list_item = selectedObject;
if (_loadedObject != nullptr)
{
_loadedObject->Unload();
_loadedObject = nullptr;
}
if (selectedObject == -1)
{

View File

@@ -98,7 +98,7 @@ void LargeSceneryObject::Unload()
gfx_object_free_images(_baseImageId, GetImageTable().GetCount());
_legacyType.name = 0;
_legacyType.image = 0;
_baseImageId = _legacyType.image = 0;
}
void LargeSceneryObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const

View File

@@ -46,6 +46,7 @@ void WaterObject::Unload()
language_free_object_string(_legacyType.string_idx);
_legacyType.string_idx = 0;
_legacyType.image_id = 0;
}
void WaterObject::DrawPreview(rct_drawpixelinfo* dpi, int32_t width, int32_t height) const