shithub: choc

Download patch

ref: eac4192d1bd74b61475ecfd3d5bee703b68ec09d
parent: fe9fc9e1078f720d8c869106ea1f93e17ee2b56f
author: Simon Howard <fraggle@gmail.com>
date: Mon Apr 4 16:12:59 EDT 2011

Fix crash.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2322

--- a/textscreen/txt_table.c
+++ b/textscreen/txt_table.c
@@ -176,7 +176,10 @@
 
     // Maintain parent pointer.
 
-    widget->parent = &table->widget;
+    if (widget != NULL)
+    {
+        widget->parent = &table->widget;
+    }
 }
 
 // Add multiple widgets to a table.