From: Karl Heuer Date: Sat, 13 Jul 1996 18:51:11 +0000 (+0000) Subject: (xm_update_menu): Fix loop termination test. X-Git-Tag: emacs-19.34~197 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=29a0dc6ce18c15adf65f7cb51e54321e79a9d0a7;p=emacs.git (xm_update_menu): Fix loop termination test. --- 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)