summaryrefslogtreecommitdiff
path: root/lwlib/lwlib-Xm.c
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1996-07-13 18:51:11 +0000
committerKarl Heuer <kwzh@gnu.org>1996-07-13 18:51:11 +0000
commit29a0dc6ce18c15adf65f7cb51e54321e79a9d0a7 (patch)
treec650a5c273686e1c9ec8b256a23341c40afbd375 /lwlib/lwlib-Xm.c
parent353e2ef2de43969fd389f3f62ed5c146850ae457 (diff)
downloademacs-29a0dc6ce18c15adf65f7cb51e54321e79a9d0a7.tar.gz
(xm_update_menu): Fix loop termination test.
Diffstat (limited to 'lwlib/lwlib-Xm.c')
-rw-r--r--lwlib/lwlib-Xm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c
index 57e4b4a2ca5..7909bac7392 100644
--- a/lwlib/lwlib-Xm.c
+++ b/lwlib/lwlib-Xm.c
@@ -553,7 +553,9 @@ xm_update_menu (instance, widget, val, deep_p)
{
if (children)
{
- for (i = 0, cur = val->contents; i < num_children;
+ for (i = 0, cur = val->contents;
+ (i < num_children
+ && cur); /* how else to ditch unwanted children ?? - mgd */
i++, cur = cur->next)
{
if (cur->this_one_change == STRUCTURAL_CHANGE)