[AC21.4] Fix crash when using window manager to delete dialog

Vin Shelton acs at xemacs.org
Thu May 17 22:13:59 EDT 2007


APPROVE COMMIT 21.4

Thanks for the patch, Stephen.

  - Vin

On 5/17/07, Stephen J. Turnbull <stephen at xemacs.org> wrote:
> 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 ();
>
>
> _______________________________________________
> XEmacs-Patches mailing list
> XEmacs-Patches at xemacs.org
> http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
>


-- 
The Journey by Mary Oliver
http://www.poemhunter.com/p/m/poem.asp?poet=6771&poem=30506



More information about the XEmacs-Patches mailing list