Avoid segfaults if XIM is set but not xim_styles

Emacs segfaults at the X11 initialization if XIM is set
and xim_styles is NULL.  This patch avoids the crash.
* src/xfns.c: Check also if FRAME_X_XIM_STYLES(f) is NULL.
(Bug#42676)  (Bug#42673)  (Bug#42677)

Copyright-paperwork-exempt: yes
This commit is contained in:
Grégory Mounié 2020-08-02 15:56:33 +02:00 committed by Eli Zaretskii
parent f54ddb0198
commit 72c5f71cd4

View file

@ -2658,7 +2658,7 @@ create_frame_xic (struct frame *f)
goto out;
xim = FRAME_X_XIM (f);
if (!xim)
if (!xim || ! FRAME_X_XIM_STYLES(f))
goto out;
/* Determine XIC style. */