1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 18:32:35 +01:00

Codechange: Manage window viewport via unique_ptr.

This commit is contained in:
Peter Nelson
2025-03-27 18:48:15 +00:00
committed by Peter Nelson
parent 8275bbfb87
commit c982816c0e
4 changed files with 5 additions and 13 deletions

View File

@@ -1090,8 +1090,6 @@ Window::~Window()
{
/* Make sure the window is closed, deletion is allowed only in Window::DeleteClosedWindows(). */
assert(*this->z_position == nullptr);
if (this->viewport != nullptr) DeleteWindowViewport(this);
}
/**