Mercurial > hg > xemacs-beta
changeset 3958:7bc12bb1a2cf
[xemacs-hg @ 2007-05-17 15:06:04 by stephent]
Fix crash with wm delete of dialog. <87sl9v8ot1.fsf@uwakimon.sk.tsukuba.ac.jp>
author | stephent |
---|---|
date | Thu, 17 May 2007 15:06:04 +0000 |
parents | 61088a67e55b |
children | 8fe2dec941b3 |
files | lwlib/ChangeLog lwlib/lwlib-Xaw.c |
diffstat | 2 files changed, 13 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lwlib/ChangeLog Wed May 16 21:51:33 2007 +0000 +++ b/lwlib/ChangeLog Thu May 17 15:06:04 2007 +0000 @@ -1,3 +1,8 @@ +2007-05-17 Stephen J. Turnbull <stephen@xemacs.org> + + * lwlib-Xaw.c (wm_delete_window): Iterate over children of shell + (there may be more than one) to find our widget. + 2006-11-17 Stephen J. Turnbull <stephen@xemacs.org> * xlwmenu.c (xlwMenuResources):
--- a/lwlib/lwlib-Xaw.c Wed May 16 21:51:33 2007 +0000 +++ b/lwlib/lwlib-Xaw.c Thu May 17 15:06:04 2007 +0000 @@ -599,11 +599,14 @@ abort (); XtSetArg (al [0], XtNchildren, &kids); XtGetValues (shell, al, 1); - if (!kids || !*kids) - abort (); - widget = kids [0]; - if (! XtIsSubclass (widget, dialogWidgetClass)) - abort (); + if (!kids || !*kids) abort (); + + for (widget = *kids; + widget && ! XtIsSubclass (widget, dialogWidgetClass); + widget = *++kids) + ; + if (!widget) abort (); + id = lw_get_widget_id (widget); if (! id) abort ();