X11 platform: Fl::enable_im() crashes without input methods (#1364)

This commit is contained in:
ManoloFLTK 2026-02-07 14:44:10 +01:00
parent 7fb11e66ee
commit ab5b28acf2

View File

@ -388,7 +388,7 @@ void Fl_X11_Screen_Driver::new_ic()
}
}
}
XFree(xim_styles);
if (xim_styles) XFree(xim_styles);
if (sarea) {
xim_ic = XCreateIC(xim_im,
@ -521,7 +521,7 @@ void Fl_X11_Screen_Driver::enable_im() {
if (win && win->shown()) {
xim_activate(fl_xid(win));
XSetICFocus(xim_ic);
} else {
} else if (xim_im) {
new_ic();
}
}