summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.