summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Howard2006-09-18 22:19:30 +0000
committerSimon Howard2006-09-18 22:19:30 +0000
commite558fa3f2dd21d2870520c2449020ec7d5f3ca57 (patch)
treec7795e0dd63b4981b096fe8d0cfec5693b0fe87f
parentef8bdb1feae078684843ae8ed3af0c632cc5eda0 (diff)
downloadchocolate-doom-e558fa3f2dd21d2870520c2449020ec7d5f3ca57.tar.gz
chocolate-doom-e558fa3f2dd21d2870520c2449020ec7d5f3ca57.tar.bz2
chocolate-doom-e558fa3f2dd21d2870520c2449020ec7d5f3ca57.zip
Fix TXT_SelectWidgets with NULL spacers.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 615
-rw-r--r--textscreen/txt_table.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/textscreen/txt_table.c b/textscreen/txt_table.c
index b6e8f29c..d1d0777e 100644
--- a/textscreen/txt_table.c
+++ b/textscreen/txt_table.c
@@ -577,6 +577,11 @@ int TXT_SelectWidget(TXT_UNCAST_ARG(table), TXT_UNCAST_ARG(widget))
for (i=0; i<table->num_widgets; ++i)
{
+ if (table->widgets[i] == NULL)
+ {
+ continue;
+ }
+
if (table->widgets[i] == widget)
{
// Found the item! Select it and return.