foxygit / doom Log in
commit fe9fc9e1078f720d8c869106ea1f93e17ee2b56f
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Mon Apr 4 20:09:42 2011 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Mon Apr 4 20:09:42 2011 +0000

    Fix crash.

    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 2321
---
 textscreen/txt_window.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/textscreen/txt_window.c b/textscreen/txt_window.c
index 7ba11778..ee668175 100644
--- a/textscreen/txt_window.c
+++ b/textscreen/txt_window.c
@@ -43,7 +43,10 @@ void TXT_SetWindowAction(txt_window_t *window,

     // Maintain parent pointer.

-    action->widget.parent = &window->table.widget;
+    if (action != NULL)
+    {
+        action->widget.parent = &window->table.widget;
+    }
 }

 txt_window_t *TXT_NewWindow(char *title)