1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 16:54:52 +01:00

Fix #4617: Crash when rotating with invalid viewport open

This commit is contained in:
Matt
2020-09-28 23:38:58 +03:00
parent d1cd2e08b5
commit d6c2ec898d
3 changed files with 11 additions and 4 deletions

View File

@@ -42,3 +42,12 @@ void rct_window::Invalidate()
{
gfx_set_dirty_blocks({ windowPos, windowPos + ScreenCoordsXY{ width, height } });
}
void rct_window::RemoveViewport()
{
if (viewport == nullptr)
return;
viewport->width = 0;
viewport = nullptr;
}