> > 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
You're right, it's safer to write
if (xim_styles) XFree(xim_styles);
and I've committed that. All other uses of xim_styles are like that,
though, that's why I thought this XFree was OK.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev