[AC21.5R21.4] Fix crash when using window manager to delete dialog
Stephen J. Turnbull
stephen at xemacs.org
Thu May 17 11:14:50 EDT 2007
APPROVE COMMIT 21.5 RECOMMEND 21.4
Applies to 21.4 HEAD with offset -2.
Per recent discussion on XEmacs Beta.
chibi:git-integration steve$ cvs diff lwlib
Index: lwlib/ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/ChangeLog,v
retrieving revision 1.90
diff -u -r1.90 ChangeLog
--- lwlib/ChangeLog 17 Nov 2006 02:50:22 -0000 1.90
+++ lwlib/ChangeLog 17 May 2007 14:55:02 -0000
@@ -0,0 +1,5 @@
+2007-05-17 Stephen J. Turnbull <stephen at xemacs.org>
+
+ * lwlib-Xaw.c (wm_delete_window): Iterate over children of shell
+ (there may be more than one) to find our widget.
+
Index: lwlib/lwlib-Xaw.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lwlib/lwlib-Xaw.c,v
retrieving revision 1.13
diff -u -r1.13 lwlib-Xaw.c
--- lwlib/lwlib-Xaw.c 2 May 2006 15:30:32 -0000 1.13
+++ lwlib/lwlib-Xaw.c 17 May 2007 14:55:02 -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 ();
More information about the XEmacs-Patches
mailing list