From e558fa3f2dd21d2870520c2449020ec7d5f3ca57 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Mon, 18 Sep 2006 22:19:30 +0000 Subject: Fix TXT_SelectWidgets with NULL spacers. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 615 --- textscreen/txt_table.c | 5 +++++ 1 file changed, 5 insertions(+) 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; inum_widgets; ++i) { + if (table->widgets[i] == NULL) + { + continue; + } + if (table->widgets[i] == widget) { // Found the item! Select it and return. -- cgit v1.2.3