summaryrefslogtreecommitdiff
path: root/textscreen/txt_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'textscreen/txt_table.c')
-rw-r--r--textscreen/txt_table.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/textscreen/txt_table.c b/textscreen/txt_table.c
index ffe6fd14..7a8624f0 100644
--- a/textscreen/txt_table.c
+++ b/textscreen/txt_table.c
@@ -173,6 +173,13 @@ void TXT_AddWidget(TXT_UNCAST_ARG(table), TXT_UNCAST_ARG(widget))
sizeof(txt_widget_t *) * (table->num_widgets + 1));
table->widgets[table->num_widgets] = widget;
++table->num_widgets;
+
+ // Maintain parent pointer.
+
+ if (widget != NULL)
+ {
+ widget->parent = &table->widget;
+ }
}
// Add multiple widgets to a table.