foxygit / doom Log in
commit 8ee96dadb97afad79ce77eef6da94a67db6be62b
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Sun Oct 23 19:42:43 2011 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Sun Oct 23 19:42:43 2011 +0000

    Fix crash when closing a window.

    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 2462
---
 textscreen/txt_window.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/textscreen/txt_window.c b/textscreen/txt_window.c
index 62f3ac8a..d33dd75b 100644
--- a/textscreen/txt_window.c
+++ b/textscreen/txt_window.c
@@ -95,6 +95,7 @@ void TXT_CloseWindow(txt_window_t *window)
     int i;

     TXT_EmitSignal(window, "closed");
+    TXT_RemoveDesktopWindow(window);

     free(window->title);

@@ -111,8 +112,6 @@ void TXT_CloseWindow(txt_window_t *window)
     // Destroy table and window

     TXT_DestroyWidget(window);
-
-    TXT_RemoveDesktopWindow(window);
 }

 static void CalcWindowPosition(txt_window_t *window)