On 22.12.2010 08:09, [email protected] wrote:
> Author: manolo
> Date: 2010-12-21 23:09:25 -0800 (Tue, 21 Dec 2010)
> New Revision: 8097
> Log:
> Fix STR #2474. This allows an FLTK application to be started at X startup and
> to respond to
> X input methods even if the XIM server starts after the application.
>
> Modified:
> branches/branch-1.3/src/Fl_x.cxx
>
> Modified: branches/branch-1.3/src/Fl_x.cxx
> ===================================================================
> --- branches/branch-1.3/src/Fl_x.cxx 2010-12-21 23:04:16 UTC (rev 8096)
> +++ branches/branch-1.3/src/Fl_x.cxx 2010-12-22 07:09:25 UTC (rev 8097)
> @@ -1400,6 +1400,12 @@
>
> fl_xmousewin = window;
> in_a_window = true;
> + { XIMStyles *xim_styles = NULL;
> + if(!fl_xim_im || XGetIMValues(fl_xim_im,
> XNQueryInputStyle,&xim_styles, NULL, NULL)) {
> + fl_init_xim();
> + }
Manolo, is it possible that xim_styles is still NULL at this point ?
Either if (!fl_xim_im) is true or if XGetIMValues() doesn't set it ?
If yes: XFree() would be called with a NULL pointer, and I read in the
man page that it "cannot be called with NULL" whatever this means.
Should we check it ?
if (xim_styles)
> + XFree(xim_styles);
> + }
Albrecht
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev