1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 17:19:09 +00:00

(svn r13099) -Fix [FS#2014]: when a window had children only one of them would be closed (on a parent closure) instead of all children.

This commit is contained in:
rubidium
2008-05-15 11:17:56 +00:00
parent 15e89b32b9
commit 009a748ab3

View File

@@ -626,8 +626,12 @@ Window::~Window()
memmove(wz, wz + 1, (byte*)_last_z_window - (byte*)wz); memmove(wz, wz + 1, (byte*)_last_z_window - (byte*)wz);
_last_z_window--; _last_z_window--;
/* Delete any children a window might have in a head-recursive manner */ /* Delete all children a window might have in a head-recursive manner */
delete FindChildWindow(this); Window *child = FindChildWindow(this);
while (child != NULL) {
delete child;
child = FindChildWindow(this);
}
WindowEvent e; WindowEvent e;
e.event = WE_DESTROY; e.event = WE_DESTROY;