From 649b25bd11434a9631d6f3a29f2d9fb36b2880de Mon Sep 17 00:00:00 2001 From: Darkvater Date: Fri, 29 Dec 2006 13:59:48 +0000 Subject: (svn r7616) -Cleanup: -(re)set _rename_[id/what] to -1 to catch invalid calls (main_gui.c) -Only invalidate widget of pause/ff instead of whole window (main_gui.c) -Remove numbering from WE_ and WC_ as it's not needed, also remove non-existing windowclasses (window.h, openttd.h) -Give names to some of the enums (window.h) -In UninitWindowSystem not only free malloc'd widgets, but also reset the z-array (window.c) -Some coding style, comments, etc. --- window.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'window.c') diff --git a/window.c b/window.c index d29963069..1b7431219 100644 --- a/window.c +++ b/window.c @@ -875,13 +875,15 @@ void InitWindowSystem(void) void UnInitWindowSystem(void) { - Window* const *wz; - // delete all malloced widgets + Window **wz; + /* Delete all malloced widgets, and reset z-array */ FOR_ALL_WINDOWS(wz) { free((*wz)->widget); (*wz)->widget = NULL; (*wz)->widget_count = 0; + *wz = NULL; } + _last_z_window = _z_windows; } void ResetWindowSystem(void) -- cgit v1.2.3-70-g09d2