foxygit / doom Log in
commit d7ef9e1512b2a7db8cde69124fcf60bd8b912a0e
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Tue Sep 19 23:20:14 2006 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Tue Sep 19 23:20:14 2006 +0000

    'widgets' variable was used uninitialised. For some reason this didn't
    always crash!

    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 624
---
 textscreen/txt_window.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/textscreen/txt_window.c b/textscreen/txt_window.c
index e25cefc7..e024cf4e 100644
--- a/textscreen/txt_window.c
+++ b/textscreen/txt_window.c
@@ -307,12 +307,12 @@ void TXT_DrawWindow(txt_window_t *window, int selected)

     // Draw an action area, if we have one

+    widgets = (txt_widget_t *) window;
+
     if (widgets->y + widgets->h < window->window_y + window->window_h - 1)
     {
         // Separator for action area

-        widgets = (txt_widget_t *) window;
-
         TXT_DrawSeparator(window->window_x, widgets->y + widgets->h,
                           window->window_w);