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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user