From: Grégory Mounié Date: Sun, 2 Aug 2020 13:56:33 +0000 (+0200) Subject: Avoid segfaults if XIM is set but not xim_styles X-Git-Tag: emacs-27.1~11 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=72c5f71cd45c860299950cd058d8e13b87375741;p=emacs.git 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 --- diff --git a/src/xfns.c b/src/xfns.c index b89fac1cdac..f9a00a6dafd 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -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. */