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
commit66171f3ef24a37ad2d2708ac7c7620e2e56d5093 (patch)
treed7a2013a25913b7ac03e64e7d09a9b6229c5a269 /lwlib/lwlib-Xm.c
parent3e45c2fedfe936817c33bdc673ad460fd8583a7e (diff)
downloademacs-66171f3ef24a37ad2d2708ac7c7620e2e56d5093.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)